Skip to content

SERLatBTH/discord

Repository files navigation

Discord Repository

This repository contains everything related to the SERL Discord Server at BTH.

Oracle

The Oracle contains intended channel structure, role permissions and functionality of the discord bot. Includes comments with reasoning behind selected features.
Acts as a backup if the Discord Server gets compromised or an authorized user changes unintended settings without documentation.

discord-bot

A simple bot to manage our SERL discord server

Build and Run

The easiest way to run the Discord bot is to use Docker. First, rename .env.sample to .env. Then set the environment variable DISCORD_TOKEN in the .env file with your token. Finally, you can use the following command to build and run the bot:

docker compose up

Development

The bot is based on the discord.py python library to get started building our first Discord app. More resources to get started:

Python Code using Discord's command API

bot = commands.Bot(command_prefix='$', intents=intents)
tree = bot.tree
@bot.event
async def on_ready():
    print(f'Bot is ready. Logged in as {bot.user}')
    await tree.sync()
@tree.command(name='test', description='Test command')
async def test(interaction: discord.Integration):
    await interaction.response.send_message('Test command works!')

Hosting

The discord.py library already include a hosting solution. We don't know how secure this solution is, but it should be sufficent for our needs.

Functionality

The intentions of the bot is to assist general information like the rules channel. It is to avoid dependency on another discord user who may leave the discord in the future. It will also make the discord server feel a bit more official and fun.

About

A simple bot to manage our SERL discord server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published