Skip to content

Valorat-discord-bot is a bot that by passing a username#tag will return some data about this user

Notifications You must be signed in to change notification settings

rokkoo/valorat-discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Valorat-discord-bot

Valorat-discord-bot is a bot that by passing a username#tag will return some data about this user

Installation

Use the package manager npm to install.

npm install

Usage

npm start

Remember to add a valid token on the .env file DISCORD_TOKEN

Register a commdan !hello <args>

// 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];

Register a slash command /hello

// 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);

Contributing

Please read CONTRIBUTING.md

License

MIT

About

Valorat-discord-bot is a bot that by passing a username#tag will return some data about this user

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published