mirror of
https://github.com/UniverseDevGroup/PokeBot.git
synced 2025-01-23 09:51:58 -05:00
Added on what the is playing
This commit is contained in:
parent
4bfd57f73d
commit
722097790e
1 changed files with 20 additions and 0 deletions
20
bot.js
20
bot.js
|
@ -7,6 +7,24 @@ const fs = require('fs');
|
||||||
bot.commands = new Discord.Collection();
|
bot.commands = new Discord.Collection();
|
||||||
bot.aliases = new Discord.Collection();
|
bot.aliases = new Discord.Collection();
|
||||||
|
|
||||||
|
function setGame() {
|
||||||
|
var games = [
|
||||||
|
"Pokemon",
|
||||||
|
"Catching things",
|
||||||
|
"Finding pokemons",
|
||||||
|
"Type p: for help"
|
||||||
|
]
|
||||||
|
|
||||||
|
bot.user.setPresence({
|
||||||
|
status: 'online',
|
||||||
|
afk: false,
|
||||||
|
game: {
|
||||||
|
type: 0,
|
||||||
|
name: games[Math.floor(Math.random() * games.length)]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
fs.readdir('./commands', (err, files) => {
|
fs.readdir('./commands', (err, files) => {
|
||||||
if (err) console.error(err);
|
if (err) console.error(err);
|
||||||
console.log(`Attempting to load a total of ${files.length} commands into the memory.`);
|
console.log(`Attempting to load a total of ${files.length} commands into the memory.`);
|
||||||
|
@ -31,6 +49,8 @@ fs.readdir('./commands', (err, files) => {
|
||||||
|
|
||||||
bot.on('ready', () => {
|
bot.on('ready', () => {
|
||||||
console.log('PokeBot has finished loading.');
|
console.log('PokeBot has finished loading.');
|
||||||
|
setGame();
|
||||||
|
bot.setInterval(setGame, 200000);
|
||||||
});
|
});
|
||||||
|
|
||||||
bot.on('guildMemberAdd', (member) => {
|
bot.on('guildMemberAdd', (member) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue