Format and lint
This commit is contained in:
@@ -12,17 +12,17 @@ export = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName("pp")
|
||||
.setDescription("Shows pp size")
|
||||
.addUserOption(
|
||||
option =>
|
||||
.addUserOption(option =>
|
||||
option
|
||||
.setName("user")
|
||||
.setDescription("User to show pp size")
|
||||
.setRequired(false)
|
||||
.setRequired(false),
|
||||
)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
const user = (interaction.options.getUser("user") || interaction.user) as User
|
||||
const user = (interaction.options.getUser("user") ||
|
||||
interaction.user) as User
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
let size: number
|
||||
|
||||
@@ -33,11 +33,13 @@ export = {
|
||||
}
|
||||
|
||||
await interaction.reply({
|
||||
embeds: [{
|
||||
embeds: [
|
||||
{
|
||||
title: `${user.username}'s pp size`,
|
||||
description: `8${"=".repeat(size)}D`,
|
||||
color: embedColor
|
||||
}]
|
||||
color: embedColor,
|
||||
},
|
||||
],
|
||||
})
|
||||
}
|
||||
},
|
||||
} as Command
|
||||
@@ -19,16 +19,20 @@ export = {
|
||||
const output = eval(code)
|
||||
const outputString = String(output)
|
||||
await message.channel.send({
|
||||
embeds: [{
|
||||
description: `\`\`\`js\n${outputString}\`\`\``
|
||||
}]
|
||||
embeds: [
|
||||
{
|
||||
description: `\`\`\`js\n${outputString}\`\`\``,
|
||||
},
|
||||
],
|
||||
})
|
||||
} catch (error) {
|
||||
await message.channel.send({
|
||||
embeds: [{
|
||||
description: `\`\`\`js\n${error}\`\`\``
|
||||
}]
|
||||
embeds: [
|
||||
{
|
||||
description: `\`\`\`js\n${error}\`\`\``,
|
||||
},
|
||||
],
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
} as Event
|
||||
@@ -25,10 +25,7 @@ export default function loadAutocompleteEvents(client: Client, ft: FileType) {
|
||||
const filePath = path.join(autocompletePath, file)
|
||||
const autocomplete: Autocomplete = require(filePath)
|
||||
|
||||
if (
|
||||
"name" in autocomplete &&
|
||||
"execute" in autocomplete
|
||||
) {
|
||||
if ("name" in autocomplete && "execute" in autocomplete) {
|
||||
client.autocomplete.set(autocomplete.name, autocomplete)
|
||||
} else {
|
||||
console.log(
|
||||
|
||||
Reference in New Issue
Block a user