Updated some types
This commit is contained in:
@@ -67,7 +67,7 @@ export default async function prune(interaction: ChatInputCommandInteraction): P
|
|||||||
)
|
)
|
||||||
]
|
]
|
||||||
}).then(async (m) => {
|
}).then(async (m) => {
|
||||||
const collector = interaction.channel!.createMessageComponentCollector({
|
const collector = m.createMessageComponentCollector({
|
||||||
componentType: ComponentType.Button,
|
componentType: ComponentType.Button,
|
||||||
filter: (i: ButtonInteraction) =>
|
filter: (i: ButtonInteraction) =>
|
||||||
(i.customId === buttonid || i.customId === cancelid) &&
|
(i.customId === buttonid || i.customId === cancelid) &&
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { embedColor, hypixelGuildID } from "config/options.js"
|
import { embedColor, hypixelGuildID } from "config/options.js"
|
||||||
import { ChatInputCommandInteraction, GuildMember } from "discord.js"
|
import { ChatInputCommandInteraction, GuildMember, TextChannel } from "discord.js"
|
||||||
import { IGuildData } from "interfaces"
|
import { IGuildData } from "interfaces"
|
||||||
import verify from "schemas/verifyTag.js"
|
import verify from "schemas/verifyTag.js"
|
||||||
import env from "utils/Env.js"
|
import env from "utils/Env.js"
|
||||||
@@ -117,7 +117,7 @@ export default async function updateAll(interaction: ChatInputCommandInteraction
|
|||||||
|
|
||||||
console.log("Successfully updated all roles.")
|
console.log("Successfully updated all roles.")
|
||||||
|
|
||||||
await interaction.channel?.send({
|
await (interaction.channel as TextChannel)?.send({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
description: "Successfully updated all roles.",
|
description: "Successfully updated all roles.",
|
||||||
color: embedColor
|
color: embedColor
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Message } from "discord.js"
|
import { ChannelType, Message } from "discord.js"
|
||||||
import { IEvent } from "interfaces"
|
import { IEvent } from "interfaces"
|
||||||
import env from "utils/Env.js"
|
import env from "utils/Env.js"
|
||||||
|
|
||||||
@@ -14,17 +14,20 @@ export default {
|
|||||||
if (!message.content.startsWith("!eval")) return
|
if (!message.content.startsWith("!eval")) return
|
||||||
|
|
||||||
const code = message.content.split(" ").slice(1).join(" ")
|
const code = message.content.split(" ").slice(1).join(" ")
|
||||||
|
const channel = message.channel
|
||||||
|
|
||||||
|
if (channel.type !== ChannelType.GuildText) return
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const output = eval(code)
|
const output = eval(code)
|
||||||
const outputString = String(output)
|
const outputString = String(output)
|
||||||
await message.channel.send({
|
await channel.send({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
description: `\`\`\`js\n${outputString}\`\`\``
|
description: `\`\`\`js\n${outputString}\`\`\``
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await message.channel.send({
|
await channel.send({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
description: `\`\`\`js\n${error}\`\`\``
|
description: `\`\`\`js\n${error}\`\`\``
|
||||||
}]
|
}]
|
||||||
|
|||||||
Reference in New Issue
Block a user