mirror of
https://github.com/ahmadk953/poixpixel-discord-bot.git
synced 2025-06-07 23:49:29 +00:00
General Updates
This commit is contained in:
parent
a67829c6f1
commit
cdb82b771e
10 changed files with 161 additions and 129 deletions
|
@ -1,21 +1,29 @@
|
|||
import { SlashCommandBuilder, CommandInteraction, GuildMember } from 'discord.js';
|
||||
import {
|
||||
SlashCommandBuilder,
|
||||
CommandInteraction,
|
||||
GuildMember,
|
||||
} from "discord.js";
|
||||
|
||||
interface Command {
|
||||
data: Omit<SlashCommandBuilder, "addSubcommand" | "addSubcommandGroup">;
|
||||
execute: (interaction: CommandInteraction) => Promise<void>;
|
||||
data: Omit<SlashCommandBuilder, "addSubcommand" | "addSubcommandGroup">;
|
||||
execute: (interaction: CommandInteraction) => Promise<void>;
|
||||
}
|
||||
|
||||
const command: Command = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('user')
|
||||
.setDescription('Provides information about the user.'),
|
||||
execute: async (interaction) => {
|
||||
if (interaction.member instanceof GuildMember) {
|
||||
await interaction.reply(`This command was run by ${interaction.user.username}, who joined on ${interaction.member.joinedAt}.`);
|
||||
} else {
|
||||
await interaction.reply(`This command was run by ${interaction.user.username}.`);
|
||||
}
|
||||
},
|
||||
data: new SlashCommandBuilder()
|
||||
.setName("user")
|
||||
.setDescription("Provides information about the user."),
|
||||
execute: async (interaction) => {
|
||||
if (interaction.member instanceof GuildMember) {
|
||||
await interaction.reply(
|
||||
`This command was run by ${interaction.user.username}, who joined this server on ${interaction.member.joinedAt}.`
|
||||
);
|
||||
} else {
|
||||
await interaction.reply(
|
||||
`This command was run by ${interaction.user.username}.`
|
||||
);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export default command;
|
||||
export default command;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue