Handle cases where error message can't be sent, added intents, disable private channels collection
This commit is contained in:
parent
7cc8ac7b6b
commit
e209199134
3 changed files with 17 additions and 5 deletions
10
app.js
10
app.js
|
@ -29,6 +29,14 @@ new Master(`Bot ${process.env.TOKEN}`, "/shard.js", {
|
|||
users: true,
|
||||
repliedUser: true
|
||||
},
|
||||
guildSubscriptions: false
|
||||
guildSubscriptions: false,
|
||||
intents: [
|
||||
"guilds",
|
||||
"guildVoiceStates",
|
||||
"guildMessages",
|
||||
"guildMessageReactions",
|
||||
"directMessages",
|
||||
"directMessageReactions"
|
||||
]
|
||||
}
|
||||
});
|
|
@ -121,10 +121,12 @@ module.exports = async (client, message) => {
|
|||
await client.createMessage(message.channel.id, `${message.author.mention}, the request timed out before I could download that image. Try uploading your image somewhere else.`);
|
||||
} else {
|
||||
logger.error(error.toString());
|
||||
try {
|
||||
await client.createMessage(message.channel.id, "Uh oh! I ran into an error while running this command. Please report the content of the attached file here or on the esmBot Support server: <https://github.com/esmBot/esmBot/issues>", [{
|
||||
file: Buffer.from(`Message: ${error}\n\nStack Trace: ${error.stack}`),
|
||||
name: "error.txt"
|
||||
}]);
|
||||
} catch { /* silently ignore */ }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
2
shard.js
2
shard.js
|
@ -111,6 +111,8 @@ class Shard extends Base {
|
|||
// connect to lavalink
|
||||
if (!sound.status && !sound.connected) await sound.connect(this.bot);
|
||||
|
||||
this.bot.privateChannels.limit = 0;
|
||||
|
||||
await database.setup();
|
||||
|
||||
// set activity (a.k.a. the gamer code)
|
||||
|
|
Loading…
Reference in a new issue