Yet another Discord framework
A framework for building fast and efficient Discord bots with biscuit.js.
Features
-
⚡ Performance:
A structure was implemented that allows algorithms to be used to evaluate and determine if one or more resources are needed.
-
💪🏻 Productivity:
Recursive file and directory load.
-
🧱 Scalability:
Implemented the possibility of using different versions of biscuit.js.
-
🚀 Compatibility:
You can use Bun or Node.
Installation
Commands
-
yotrd init [<folder-name>].
This command will create the necessary directories and files for the correct functioning of the framework.
.
|_ .yotrd.config.js
|
|_ events/
|
|_ services/
|
|_ commands/
.
|_ chat/
|
|_ user/
|
|_ message/
-
yotrd deploy [<config-file-path>].
This command will run the framework.
Example
See example here.
Structures
Event
export default {
name: 'example',
level: 0,
intents: 0,
execute ({
config, session,
eventsPath,
servicesPath,
chatInputCommandsPath,
userContextMenuCommandsPath,
messageContextMenuCommandsPath,
loadedEvents,
loadedServices,
loadedChatInputCommands,
loadedUserContextMenuCommands,
loadedMessageContextMenuCommands,
usedEvents,
usedIntents
}) {
}
};
Service
export default {
name: 'example',
level: 0,
intents: 0,
events: {
example ({
config, session,
eventsPath,
servicesPath,
chatInputCommandsPath,
userContextMenuCommandsPath,
messageContextMenuCommandsPath,
loadedEvents,
loadedServices,
loadedChatInputCommands,
loadedUserContextMenuCommands,
loadedMessageContextMenuCommands,
usedEvents,
usedIntents
}) {
}
}
};
Slash Command
export default {
name: 'example',
type: 1,
level: 0,
intents: 0,
display: {
name: {
default: 'example',
},
description: {
default: 'Example command',
},
options: [],
permissions: {
dm: false,
nsfw: false,
member: null
},
data: {
name: 'example',
description: 'Example',
name_localizations: {},
description_localizations: {},
options: [],
dm_permission: false,
nsfw: false,
default_member_permissions: null
}
}
};
User Context Menu Command
export default {
name: 'example',
type: 2,
level: 0,
intents: 0,
display: {
name: {
default: 'Example',
},
permissions: {
dm: false,
nsfw: false,
member: null
},
data: {
name: 'Example',
name_localizations: {},
dm_permission: false,
nsfw: false,
default_member_permissions: null
}
}
};
Message Context Menu Command
export default {
name: 'example',
type: 3,
level: 0,
intents: 0,
display: {
name: {
default: 'Example',
},
permissions: {
dm: false,
nsfw: false,
member: null
},
data: {
name: 'Example',
name_localizations: {},
dm_permission: false,
nsfw: false,
default_member_permissions: null
}
}
};