generated from mezotv/Discord-Bot-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update replay.js * Create cooldown.js * Update en_EN.json * -votingCooldown * Daily MSG Fix * Revert "Merge remote-tracking branch 'origin/Cooldown-Functions'" This reverts commit e4de18c, reversing changes made to 756a0e9. --------- Co-authored-by: ForGetFulSkyBro <47897305+forgetfulskybro@users.noreply.github.com> Co-authored-by: Sean <sattler.junior@gmail.com>
- Loading branch information
1 parent
756a0e9
commit 86fde6d
Showing
12 changed files
with
222 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,44 @@ | ||
const { WebhookClient, EmbedBuilder } = require('discord.js'); | ||
const {WebhookClient, EmbedBuilder} = require('discord.js'); | ||
require('dotenv').config(); | ||
|
||
module.exports = async (client, guild) => { | ||
if (!guild?.name) return; | ||
if (!guild?.name) return; | ||
|
||
// Create and save the settings in the cache so that we don't need to do that at a command run | ||
await client.database.getGuild(guild?.id, true); | ||
// Create and save the settings in the cache so that we don't need to do that at a command run | ||
await client.database.getGuild(guild?.id, true); | ||
|
||
const webhookClient = new WebhookClient({ url: process.env.WEBHOOK }); | ||
const webhookPrivate = new WebhookClient({ url: process.env.WEBHOOKPRIVATE }); | ||
const webhookPrivate = new WebhookClient({url: process.env.WEBHOOKPRIVATE}); | ||
|
||
let features; | ||
if (guild.features && guild.features.includes("VERIFIED") || guild.features.includes("PARTNERED")) { | ||
features = guild.features.includes("VERIFIED") ? `<:verified_green:1072265950134550548>` : `<:partner:1072265822577360982>` | ||
} | ||
let features; | ||
if (guild.features && guild.features.includes("VERIFIED") || guild.features.includes("PARTNERED")) { | ||
features = guild.features.includes("VERIFIED") ? `<:verified_green:1072265950134550548>` : `<:partner:1072265822577360982>` | ||
} | ||
|
||
webhookPrivate.send({ | ||
embeds: [new EmbedBuilder().setTitle(`→ Joined Server`).setColor(`#0598F4`).setThumbnail(guild.iconURL({ format: 'png', dynamic: true })).setDescription(`**Name**: ${guild.name.replace("Discord", "").replace("discord", "").replace("Everyone", "").replace("everyone", "")}\n**Users**: ${guild.memberCount.toLocaleString()}${features ? `\n**Features**: ${features}` : ``}`)] | ||
}) | ||
await webhookPrivate.send({ | ||
avatarURL: 'https://wouldyoubot.gg/static/img/round.webp', // Make sure to update this if you ever change the link thx <3 | ||
username: global?.devBot ? 'Dev Bot' : 'Main Bot', | ||
embeds: [ | ||
new EmbedBuilder() | ||
.setTitle(`→ Joined Server`) | ||
.setColor(`#0598F4`) | ||
.setThumbnail(guild.iconURL({ | ||
format: 'png', | ||
dynamic: true | ||
})) | ||
.setDescription(`**Name**: ${guild.name.replace("Discord", "").replace("discord", "").replace("Everyone", "").replace("everyone", "")}\n**Users**: ${guild.memberCount.toLocaleString()}${features ? `\n**Features**: ${features}` : ``}`) | ||
.setFooter({ | ||
text: global?.devBot ? 'Dev Bot' : 'Main Bot', | ||
}) | ||
] | ||
}) | ||
|
||
webhookClient.send({ | ||
content: `<:GoodCheck:1025490645525209148> Joined ${guild.name.replace("Discord", "").replace("discord", "").replace("Everyone", "").replace("everyone", "")}. I'm now in ${client.guilds.cache.size} guilds.`, | ||
username: `${guild.name.replace("Discord", "").replace("discord", "").replace("Everyone", "").replace("everyone", "")}`, | ||
avatarURL: guild.iconURL({ format: 'webp', dynamic: true, size: 1024 }), | ||
}).catch((err) => console.log(err)); | ||
if (!global?.devBot) { | ||
const webhookClient = new WebhookClient({url: process.env.WEBHOOK}); | ||
|
||
await webhookClient.send({ | ||
content: `<:GoodCheck:1025490645525209148> Joined ${guild.name.replace("Discord", "").replace("discord", "").replace("Everyone", "").replace("everyone", "")}. I'm now in ${client.guilds.cache.size} guilds.`, | ||
username: `${guild.name.replace("Discord", "").replace("discord", "").replace("Everyone", "").replace("everyone", "")}`, | ||
avatarURL: guild.iconURL({format: 'webp', dynamic: true, size: 1024}), | ||
}).catch((err) => console.log(err)); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,44 @@ | ||
const { WebhookClient, EmbedBuilder } = require('discord.js'); | ||
const {WebhookClient, EmbedBuilder} = require('discord.js'); | ||
require('dotenv').config(); | ||
|
||
module.exports = async (client, guild) => { | ||
if(!guild?.name) return; | ||
if (!guild?.name) return; | ||
|
||
// Only delete the guild settings from the cache we don't want a data lose but also don't need not used data in the cache :) | ||
await client.database.deleteGuild(guild?.id, true); | ||
// Only delete the guild settings from the cache we don't want a data lose but also don't need not used data in the cache :) | ||
await client.database.deleteGuild(guild?.id, true); | ||
|
||
const webhookClient = new WebhookClient({ url: process.env.WEBHOOK }); | ||
const webhookPrivate = new WebhookClient({ url: process.env.WEBHOOKPRIVATE }); | ||
const webhookPrivate = new WebhookClient({url: process.env.WEBHOOKPRIVATE}); | ||
|
||
let features; | ||
if (guild.features && guild.features.includes("VERIFIED") || guild.features.includes("PARTNERED")) { | ||
features = guild.features.includes("VERIFIED") ? `<:verified_green:1072265950134550548>` : `<:partner:1072265822577360982>`; | ||
}; | ||
let features; | ||
if (guild.features && guild.features.includes("VERIFIED") || guild.features.includes("PARTNERED")) { | ||
features = guild.features.includes("VERIFIED") ? `<:verified_green:1072265950134550548>` : `<:partner:1072265822577360982>`; | ||
} | ||
|
||
webhookPrivate.send({ | ||
embeds: [new EmbedBuilder().setTitle(`← Left Server`).setColor(`#0598F4`).setThumbnail(guild.iconURL({ format: 'png', dynamic: true })).setDescription(`**Name**: ${guild.name.replace("Discord", "").replace("discord", "").replace("Everyone", "").replace("everyone", "")}\n**Users**: ${guild.memberCount.toLocaleString()}${features ? `\n**Features**: ${features}` : ``}`)] | ||
}); | ||
await webhookPrivate.send({ | ||
avatarURL: 'https://wouldyoubot.gg/static/img/round.webp', // Make sure to update this if you ever change the link thx <3 | ||
username: global?.devBot ? 'Dev Bot' : 'Main Bot', | ||
embeds: [ | ||
new EmbedBuilder() | ||
.setTitle(`← Left Server`) | ||
.setColor(`#0598F4`) | ||
.setThumbnail(guild.iconURL({ | ||
format: 'png', | ||
dynamic: true | ||
})) | ||
.setDescription(`**Name**: ${guild.name.replace("Discord", "").replace("discord", "").replace("Everyone", "").replace("everyone", "")}\n**Users**: ${guild.memberCount.toLocaleString()}${features ? `\n**Features**: ${features}` : ``}`) | ||
.setFooter({ | ||
text: global?.devBot ? 'Dev Bot' : 'Main Bot', | ||
}) | ||
] | ||
}); | ||
|
||
webhookClient.send({ | ||
content: `<:BadCheck:1025490660968628436> Left ${guild.name.replace("Discord", "").replace("discord", "").replace("Everyone", "").replace("everyone", "")}. I'm now in ${client.guilds.cache.size} guilds.`, | ||
username: `${guild.name.replace("Discord", "").replace("discord", "").replace("Everyone", "").replace("everyone", "")}`, | ||
avatarURL: guild.iconURL({ format: 'webp', dynamic: true, size: 1024 }), | ||
}).catch((err) => console.log(err)); | ||
if (!global?.devBot) { | ||
const webhookClient = new WebhookClient({url: process.env.WEBHOOK}); | ||
|
||
await webhookClient.send({ | ||
content: `<:BadCheck:1025490660968628436> Left ${guild.name.replace("Discord", "").replace("discord", "").replace("Everyone", "").replace("everyone", "")}. I'm now in ${client.guilds.cache.size} guilds.`, | ||
username: `${guild.name.replace("Discord", "").replace("discord", "").replace("Everyone", "").replace("everyone", "")}`, | ||
avatarURL: guild.iconURL({format: 'webp', dynamic: true, size: 1024}), | ||
}).catch((err) => console.log(err)); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.