bug fixes/remove tweet channel

This commit is contained in:
SowinskiBraeden committed 2022-07-03 19:12:09 -07:00
1 parent 918b383a48
commit 9d9c23e8cc
6 files changed
+137 -50

No files matched your search

+27 -25
View File
@@ -27,32 +27,34 @@ class QuarksBot extends Client {
this.Ready = false;
this.ws.on("INTERACTION_CREATE", async (interaction) => {
client.log("Interaction")
let GuildDB = await this.GetGuild(interaction.guild_id);
const command = interaction.data.name.toLowerCase();
const args = interaction.data.options;
if (interaction.type!=3) {
client.log("Interaction")
let GuildDB = await this.GetGuild(interaction.guild_id);
//Easy to send respnose so ;)
interaction.guild = await this.guilds.fetch(interaction.guild_id);
interaction.send = async (message) => {
return await this.api
.interactions(interaction.id, interaction.token)
.callback.post({
data: {
type: 4,
data:
typeof message == "string"
? { content: message }
: message.type && message.type === "rich"
? { embeds: [message] }
: message,
},
});
};
let cmd = client.commands.get(command);
if (cmd.SlashCommand && cmd.SlashCommand.run)
cmd.SlashCommand.run(this, interaction, args, { GuildDB });
const command = interaction.data.name.toLowerCase();
const args = interaction.data.options;
//Easy to send respnose so ;)
interaction.guild = await this.guilds.fetch(interaction.guild_id);
interaction.send = async (message) => {
return await this.api
.interactions(interaction.id, interaction.token)
.callback.post({
data: {
type: 4,
data:
typeof message == "string"
? { content: message }
: message.type && message.type === "rich"
? { embeds: [message] }
: message,
},
});
};
let cmd = client.commands.get(command);
if (cmd.SlashCommand && cmd.SlashCommand.run)
cmd.SlashCommand.run(this, interaction, args, { GuildDB });
}
});
const client = this;