auth-bot

Discord Bot to verify user, allowing server owner to recover server by pulling back members.
git clone https://codeberg.org/night0721/auth-bot
Log | Files | Refs | README | LICENSE

commit caddf70fb7b214f060c5b98aa453c34945e4198e
parent 1168c0bfd25b97f437721d67f1a6ed3e7840bdc9
Author: NK <[email protected]>
Date:   Mon, 10 Apr 2023 15:11:56 +0100

x

Diffstat:
Mclient/commands/Utils/setup.js | 54++++++++++++++++++++++++++++--------------------------
1 file changed, 28 insertions(+), 26 deletions(-)

diff --git a/client/commands/Utils/setup.js b/client/commands/Utils/setup.js @@ -66,33 +66,35 @@ module.exports = { members, role: args[1], }).save(); - interaction.guild.channels.cache.get(args[0]).send({ - embeds: [ - new EmbedBuilder() - .setTitle("Verify yourself in this server") - .setDescription( - "Verifying allows server admins to add you to new server in case it got deleted. You can deauthorize the bot in 'Authorized Apps', but we will not be able to add you to backup servers." - ) - .setFooter({ - text: "By verifying you agree to let the owner make you join future servers", - }) - .setColor("#02023a"), - ], - components: [ - new ActionRowBuilder().addComponents( - new ButtonBuilder() - .setLabel("Verify here") - .setURL( - `https://discord.com/oauth2/authorize?response_type=code&redirect_uri=${encodeURIComponent( - process.env.CALLBACK_URL - )}&scope=${encodeURIComponent( - config.scope.join(" ") - )}&client_id=${process.env.CLIENT_ID}` + try { + interaction.guild.channels.cache.get(args[0]).send({ + embeds: [ + new EmbedBuilder() + .setTitle("Verify yourself in this server") + .setDescription( + "Verifying allows server admins to add you to new server in case it got deleted. You can deauthorize the bot in 'Authorized Apps', but we will not be able to add you to backup servers." ) - .setStyle(ButtonStyle.Link) - ), - ], - }); + .setFooter({ + text: "By verifying you agree to let the owner make you join future servers", + }) + .setColor("#02023a"), + ], + components: [ + new ActionRowBuilder().addComponents( + new ButtonBuilder() + .setLabel("Verify here") + .setURL( + `https://discord.com/oauth2/authorize?response_type=code&redirect_uri=${encodeURIComponent( + process.env.CALLBACK_URL + )}&scope=${encodeURIComponent( + config.scope.join(" ") + )}&client_id=${process.env.CLIENT_ID}` + ) + .setStyle(ButtonStyle.Link) + ), + ], + }); + } catch (e) {} }, };