Format and lint
This commit is contained in:
@@ -12,17 +12,17 @@ export = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName("pp")
|
||||
.setDescription("Shows pp size")
|
||||
.addUserOption(
|
||||
option =>
|
||||
option
|
||||
.setName("user")
|
||||
.setDescription("User to show pp size")
|
||||
.setRequired(false)
|
||||
.addUserOption(option =>
|
||||
option
|
||||
.setName("user")
|
||||
.setDescription("User to show pp size")
|
||||
.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: [{
|
||||
title: `${user.username}'s pp size`,
|
||||
description: `8${"=".repeat(size)}D`,
|
||||
color: embedColor
|
||||
}]
|
||||
embeds: [
|
||||
{
|
||||
title: `${user.username}'s pp size`,
|
||||
description: `8${"=".repeat(size)}D`,
|
||||
color: embedColor,
|
||||
},
|
||||
],
|
||||
})
|
||||
}
|
||||
},
|
||||
} as Command
|
||||
@@ -128,7 +128,7 @@ export = {
|
||||
userMention(target.id) +
|
||||
" for " +
|
||||
reason),
|
||||
(timeouttime = null)
|
||||
(timeouttime = null)
|
||||
} else {
|
||||
title = "Timeout Updated"
|
||||
;(description =
|
||||
@@ -138,7 +138,7 @@ export = {
|
||||
prettyTime +
|
||||
" for " +
|
||||
reason),
|
||||
(timeouttime = time)
|
||||
(timeouttime = time)
|
||||
}
|
||||
} else {
|
||||
title = "Member Timed Out"
|
||||
@@ -149,7 +149,7 @@ export = {
|
||||
prettyTime +
|
||||
" for " +
|
||||
reason),
|
||||
(timeouttime = time)
|
||||
(timeouttime = time)
|
||||
}
|
||||
|
||||
await target.timeout(timeouttime, reason)
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -10,14 +10,14 @@ function getExpForLevel(level: number): number {
|
||||
}
|
||||
|
||||
switch (respectedLevel) {
|
||||
case 1:
|
||||
return 500
|
||||
case 2:
|
||||
return 1000
|
||||
case 3:
|
||||
return 2000
|
||||
case 4:
|
||||
return 3500
|
||||
case 1:
|
||||
return 500
|
||||
case 2:
|
||||
return 1000
|
||||
case 3:
|
||||
return 2000
|
||||
case 4:
|
||||
return 3500
|
||||
}
|
||||
return 5000
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@ function getLevel(exp: number): number {
|
||||
return exp <= 1
|
||||
? 1
|
||||
: Math.floor(
|
||||
1 +
|
||||
1 +
|
||||
REVERSE_PQ_PREFIX +
|
||||
Math.sqrt(REVERSE_CONST + GROWTH_DIVIDES_2 * exp),
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
function hypixelLevel(exp: number): number {
|
||||
|
||||
Reference in New Issue
Block a user