Skip to content

burakbehlull/discord-bot-typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discordjs Bot Typescript

Run: npm run dev or yarn dev

Command Comment
npm start Runs discord bot
npm run deploy deploy slash command loads to discord bot

Fill in the .env file within the project with your information:

TOKEN = 
BOT_ID = 
PREFIX = 

Usages:

//  one way
const Hello : ITypes.ISlashCommand = {}
export default Hello

// two way
export default {} as ITypes.ISlashCommand

contents:

  • events loader
  • slash commands loader
  • prefix commands loader
  • deploy command
  • defined types

type usages:

type comment meets use
IPrefixCommand Used for prefix commands name, execute {name: "exampleCommand"} as IPrefixCommand
PrefixCommandArgs Is a type given to command values client, message, args execute({client, message, args} : PrefixCommandArgs){}
ISlashCommand Used for slash commands data, execute {name: "exampleCommand"} as ISlashCommand
SlashCommandArgs Is a type given to command values client, interaction execute({client, interaction} : SlashCommandArgs){}
IEvent A type given to event files name, once, execute IEvent<ActivityType.ClientReady>

Releases

No releases published

Packages

No packages published