Replaced clang format with prettuier (sadly)

This commit is contained in:
2023-12-28 16:47:52 +01:00
parent ca5bbd0b81
commit 117140fe9d
99 changed files with 13519 additions and 12011 deletions

View File

@@ -1,4 +1,8 @@
import { SlashCommandBuilder, PermissionFlagsBits, userMention } from "discord.js"
import {
SlashCommandBuilder,
PermissionFlagsBits,
userMention,
} from "discord.js"
import { Command } from "../interfaces"
export = {
@@ -15,29 +19,39 @@ export = {
option
.setName("user")
.setDescription("The user to set the nickname for")
.setRequired(true))
.setRequired(true),
)
.addStringOption(option =>
option
.setName("nickname")
.setDescription("The nickname to set")
.setRequired(true))
.setRequired(true),
)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageNicknames)
.setDMPermission(false),
async execute(interaction) {
const user = interaction.options.getUser("user")!
const nickname = interaction.options.getString("nickname")
const member = await interaction.guild!.members.fetch(user.id)
if (!member.manageable) {
interaction.reply({ content: "I cannot set the nickname for this user!", ephemeral: true })
interaction.reply({
content: "I cannot set the nickname for this user!",
ephemeral: true,
})
return
}
await member.setNickname(nickname, `Set by ${interaction.user.tag}`)
await interaction.reply({ content: "Set the nickname of " + userMention(member.id) + " to " + nickname, ephemeral: true })
}
} as Command
await interaction.reply({
content:
"Set the nickname of " +
userMention(member.id) +
" to " +
nickname,
ephemeral: true,
})
},
} as Command