Initial module system
This commit is contained in:
10
modules/welcomer/index.js
Normal file
10
modules/welcomer/index.js
Normal file
@@ -0,0 +1,10 @@
|
||||
module.exports = function(bot, api) {
|
||||
bot.on('ready', async () => {
|
||||
console.log("Bot initialized and listening");
|
||||
const guild = await bot.guilds.fetch(process.env.GUILD);
|
||||
const channel = await bot.channels.fetch(process.env.CHANNEL);
|
||||
await api.joinChannel(channel);
|
||||
|
||||
api.speak(channel, `Hi! I'm alive. It is now ${new Date().toLocaleTimeString()} on ${new Date().toLocaleDateString()}`);
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user