Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/strato-emu/strato-bot
The bot for the official Strato Emulator Discord Server
https://github.com/strato-emu/strato-bot
bot discord strato
Last synced: 10 days ago
JSON representation
The bot for the official Strato Emulator Discord Server
- Host: GitHub
- URL: https://github.com/strato-emu/strato-bot
- Owner: strato-emu
- License: gpl-3.0
- Created: 2023-05-15T21:00:25.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-21T00:37:19.000Z (about 1 year ago)
- Last Synced: 2023-10-21T01:39:05.204Z (about 1 year ago)
- Topics: bot, discord, strato
- Language: TypeScript
- Size: 312 KB
- Stars: 12
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Strato Bot
We needed a bot for managing our Discord server with specific features. Strato Bot was created so that we could effectively moderate and help people in an efficient manner and meet the special needs of managing an emulation server with potential for integration with the application in the future.
Strato Bot is forked from [Skyline Bot](https://github.com/skyline-emu/skyline-bot).
## Outline
### Events
These are any events emitted by the Discord API that are visible to the bot, such as:
- Triggering an interaction (`interactionCreate`)
- Successful connection with the Discord API (`ready`)
- Sending a message (`messageCreate`)
- Modification of a guild member (`guildMemberUpdate`)### Filters
These are implemented in the `messageCreate` event file. The functions added are run for every message that the bot recieves.
### Commands
Strato Bot uses Discord interactions (slash commands, modals, etc.) to provide users with a simple way of communicating with the bot.
## Setup and usage
### Step 1: Install Node.js
We use Discord.js for writing the bot, a module that allows the bot to connect with the Discord API through Node.js. Install Node.js to develop or host an instance of Strato Bot.
### Step 2: Installing modules and dependencies
Download the code and extract it to a folder. Run `npm i` from inside the project folder to install the necessary modules and dependencies that allow Strato Bot to run.
### Step 3: Starting the bot
To start the bot in development mode, run `npm run tscw`. This is a script that will allow users to make changes to the code that will be detected and recompiled as they are made. Otherwise, run `npm run start`. Bot commands are updated on start for both scripts.
## Docker Support
Docker packages can be created and run using Github workflows. Run the Docker images by downloading the package, cloning the .env file in the source code, and doing `docker run --env-file <.env file name> `.
## Notes
- Strato Bot is written in TypeScript to allow for compile-time error checking. Strato Bot is also written completely using the ECMAScript standard for added concision and convenience.
- Strato Bot logs command usage to a file named console.log in the root directory by default, using the function logToFile.
- To set command permissions beyond the defaults, you'll need to edit them in server settings.