Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ayocord-js/ayocord
Discord.js library with decorators
https://github.com/ayocord-js/ayocord
decorators discord discord-js framework library typescript
Last synced: 8 days ago
JSON representation
Discord.js library with decorators
- Host: GitHub
- URL: https://github.com/ayocord-js/ayocord
- Owner: ayocord-js
- Created: 2024-12-22T21:29:52.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-01-07T23:23:40.000Z (23 days ago)
- Last Synced: 2025-01-08T00:26:56.657Z (23 days ago)
- Topics: decorators, discord, discord-js, framework, library, typescript
- Language: TypeScript
- Homepage: https://www.ayocord.tech/
- Size: 464 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Introduction
Ayocord is a discord.js typescript framework based on decorators
## Documenation
Check our documentation
## Installation
> npm
```bash
npm i ayocord
```> yarn
```bash
yarn add ayocord
```## Little bit history?
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## Features
- **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
- **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## Realesed Features
### Launcher
> Internal feature
- [x] DiscordClient
- [x] DiscordCollector
- [x] DiscordFactory### Handlers
> Internal feature
- [x] EventHandler
- [x] InteractionHandler
- [x] TextCommandHandler### Interaction Decorators
> Use this decorators for interact with discord API
> There are two ways to use this decorators**Recommended**
- Methods
- [x] Event
- [x] Component
- [x] SlashCommand
- [x] TextCommand
- [x] AutoComplete
- [x] SubCommand### Views
> Use this decorators to creating action rows with callback
- [x] Views
- [x] Button
- [x] StringSelect
- [x] RoleSelect
- [x] ChannelSelect### Guards
> Use this decorator for checking permissions or another stuff before user interact with command or something else
- Decorators
- [x] Guard
- Interfaces
- [x] CanUse### Job
> Use this decorator to repeat action every duration
- Decorators
- [ ] Job
- Cache
- [ ] Set jobs
- [ ] Cancel jobs### Modules
- Decorators
- [x] Module
- Lifecycle
- [x] onEnabled
- [x] onDisable
- Module util
- [x] moduleEnable
- [x] moduleDisable