Skip to content

Commit

Permalink
fix: add guild.available checking false
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperchupuDev committed Oct 11, 2021
1 parent dc434f3 commit f2e44b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions events/guildCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module.exports = {
name: 'guildCreate',
once: false,
async execute(guild, client) {
if (guild.available === false) {
return;
}
const channel = client.channels.cache.get(client.config.guildLogs);
channel.send({
embeds: [{
Expand Down
3 changes: 3 additions & 0 deletions events/guildDelete.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module.exports = {
name: 'guildDelete',
once: false,
async execute(guild, client) {
if (guild.available === false) {
return;
}
const channel = client.channels.cache.get(client.config.guildLogs);
channel.send({
embeds: [{
Expand Down

0 comments on commit f2e44b8

Please sign in to comment.