Skip to content

Commit

Permalink
Merge pull request gndx#2 from jgalianoz/copies
Browse files Browse the repository at this point in the history
Separate copies to one centralized file
  • Loading branch information
gndx authored May 26, 2020
2 parents 681e681 + 3ed0a47 commit 3facda0
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 11 deletions.
16 changes: 9 additions & 7 deletions src/config/commands.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
const copies = require('../data/copies.json');

const commands = {
merch: 'HolidayPresent El nuevo merchandising está aquí.... Compruébalo: https://merch.streamelements.com/gndxdev',
patreon: 'GivePLZ Quieres apoyar este contenido: Visita mi Patreon: https://www.patreon.com/gndx',
blog: 'TakeNRG Te comparto mi blog: https://gndx.dev y mi canal de YouTube donde comparto mis conferencias: https://youtube.com/c/oscarbarajas : Quieres apoyar mi contenido educativo visita mi Patreon: https://www.patreon.com/gndx',
social: 'Mis Redes sociales: \n Instagram: https://instagram.com/gndx \n Twitter: https://twitter.com/gndx \n GitHub: https://github.com/gndx',
courses: '🎓📗 Mis cursos en Platzi: https://platzi.com/teachers/gndx/',
twitch: 'imGlitch Recuerda todos los domingos a las 6:00 P.M. Hablo de tecnología en vivo en este canal, ¡Sígueme!',
youtube: 'EarthDay Suscríbete a mi canal de YouTube donde comparto mis conferencias https://youtube.com/c/oscarbarajas'
merch: copies.commands.merch,
patreon: copies.commands.patreon,
blog: copies.commands.blog,
social: copies.commands.social,
courses: copies.commands.courses,
twitch: copies.commands.twitch,
youtube: copies.commands.youtube
};

module.exports = commands;
8 changes: 5 additions & 3 deletions src/config/greetings.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const copies = require('../data/copies.json');

const greetings = {
welcome: '¡Bienvenidos! ;)',
hello: 'imGlitch Hola',
subs: '¡Gracias por suscribirte! BloodTrail'
welcome: copies.greetings.welcome,
hello: copies.greetings.hello,
subs: copies.greetings.subs
};

module.exports = greetings;
16 changes: 16 additions & 0 deletions src/data/copies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"commands": {
"merch": "HolidayPresent El nuevo merchandising está aquí.... Compruébalo: https://merch.streamelements.com/gndxdev",
"patreon": "GivePLZ Quieres apoyar este contenido: Visita mi Patreon: https://www.patreon.com/gndx",
"blog": "TakeNRG Te comparto mi blog: https://gndx.dev y mi canal de YouTube donde comparto mis conferencias: https://youtube.com/c/oscarbarajas : Quieres apoyar mi contenido educativo visita mi Patreon: https://www.patreon.com/gndx",
"social": "Mis Redes sociales: \n Instagram: https://instagram.com/gndx \n Twitter: https://twitter.com/gndx \n GitHub: https://github.com/gndx",
"courses": "🎓📗 Mis cursos en Platzi: https://platzi.com/teachers/gndx/",
"twitch": "imGlitch Recuerda todos los domingos a las 6:00 P.M. Hablo de tecnología en vivo en este canal, ¡Sígueme!",
"youtube": "EarthDay Suscríbete a mi canal de YouTube donde comparto mis conferencias https://youtube.com/c/oscarbarajas"
},
"greetings": {
"welcome": "¡Bienvenidos! ;)",
"hello": "imGlitch Hola",
"subs": "¡Gracias por suscribirte! BloodTrail"
}
}
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ client.on("message", async (target, context, msg, self) => {
sendMessage(target, text, welcomeList, `@${context.username} ${greetings.hello}`);
});

client.on("subscription", (channel, username, method, message, userstate) => {
client.on("subscription", (channel, username) => {
client.say(channel, `${username}, ${greetings.subs}`);
});

Expand Down

0 comments on commit 3facda0

Please sign in to comment.