Ayocord is a discord.js typescript framework based on decorators
Check our documentation
npm
npm i ayocord
yarn
yarn add ayocord
I always write handlers for my bots and it was really boring and sometimes hard
For each commands you must create files
In python discord libraries we're using decorators for solving this problem
One class = one module (cog in python sleng), however I hate python and love TypeScript ecosystem but this way for creating discord bots I like and I decided to create this framework
- Decorator Based Syntax - use TypeScript decorators and class based way to write your discord bot
- Interactions - use decorators to interact with discord API in one class
- Event
- Slash commands
- Text commands
- Autocomplete
- Views - using for create your rows with callback!
- Button
- Select (Role, Channel, User, String)
- Modal
- Guards - check permissions before user use your command
- Guard
- Jobs - you need to check use subcribes every 20 seconds? This decorators can solve your problem
- Job
- Interactions - use decorators to interact with discord API in one class
- Utils - some useful utils for your discord bot (not rich and not poor)
- Snowflake parser
- Discohook parser
- CustomId parser
- Multi tokens - allow you launch few bots simultaneously
Internal feature
- DiscordClient
- DiscordCollector
- DiscordFactory
Internal feature
- EventHandler
- InteractionHandler
- TextCommandHandler
Use this decorators for interact with discord API
There are two ways to use this decorators
Recommended
-
Methods
- Event
- Component
- SlashCommand
- TextCommand
- AutoComplete
- SubCommand
Use this decorators to creating action rows with callback
- Views
- Button
- StringSelect
- RoleSelect
- ChannelSelect
Use this decorator for checking permissions or another stuff before user interact with command or something else
- Decorators
- Guard
- Interfaces
- CanUse
Use this decorator to repeat action every duration
- Decorators
- Job
- Cache
- Set jobs
- Cancel jobs
- Decorators
- Module
- Lifecycle
- onEnabled
- onDisable
- Module util
- moduleEnable
- moduleDisable