forked from Hypixel-Translators/hypixel-translators-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
crowdinverify.ts
24 lines (22 loc) · 1.04 KB
/
crowdinverify.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { successColor } from "../../config.json"
import Discord from "discord.js"
import crowdin from "../../events/crowdinverify"
import { client, Command } from "../../index"
const command: Command = {
name: "crowdinverify",
description: "Goes through all the stored profiles and updates the user's roles accordingly",
allowDM: true,
roleWhitelist: ["764442984119795732"], //Discord Administrator
async execute(interaction: Discord.CommandInteraction) {
await interaction.defer()
await crowdin(client, true)
const embed = new Discord.MessageEmbed()
.setColor(successColor)
.setAuthor("Role updater")
.setTitle("All verified users had their roles updated!")
.setDescription("Check the console for any errors that may have occured in the process")
.setFooter(`Executed by ${interaction.user.tag}`, interaction.user.displayAvatarURL({ format: "png", dynamic: true }))
await interaction.editReply({ embeds: [embed] })
}
}
export default command