Valorat-discord-bot is a bot that by passing a username#tag
will return some data about this user
Use the package manager npm to install.
npm install
npm start
Remember to add a valid token on the .env
file DISCORD_TOKEN
// create the command commands/index.ts
const helloCommand: Command = {
command: 'hello',
action(message, args) {
console.log('message from helloCommand', args);
message.reply(`args -> ${args.toString()}`);
},
};
// Add the command to the list
const commands: Command[] = [helloCommand];
// create the command
export const Hello: Command = {
name: "hello",
description: "Returns a greeting",
type: ApplicationCommandType.ChatInput,
// here we construct our logic for this command
run: async (client, interaction) => {
const content = "Hello there!";
await interaction.followUp({
ephemeral: true,
content,
});
},
};
// Add the command to the list
export const Commands: Command[] = [Hello];
// Register commands
await client.application.commands.(Commands);
Please read CONTRIBUTING.md