Skip to content

mmerfort/TwiggyBot

This branch is 15 commits behind Brexbot/TwiggyBot:main.

Folders and files

NameName
Last commit message
Last commit date
Mar 19, 2025
Jan 22, 2022
Nov 3, 2024
Mar 26, 2023
Nov 3, 2024
Jan 15, 2022
Jan 9, 2022
Aug 5, 2022
Nov 3, 2024
Jan 14, 2022
Jan 12, 2022
Jan 14, 2022
Nov 3, 2024
Mar 19, 2025
Nov 3, 2024
Jan 9, 2022
Aug 2, 2024

Repository files navigation

The Banana Hammock - Discord Bot

Example taken from https://github.com/oceanroleplay/discord.ts-example

Relevant links:

To-do

  1. Determine scope of bot. Integrate within Discord server
  2. Decide Framework. TypeScript, with SQLLite DB
  3. Implement working base bot.
    1. Get a prod bot on Banana Discord
    2. Create and connect SQLLite DB to bot/bot code. (Separate prod/dev dbs?)
  4. Start-to-finish documentation for setup and new devs.
  5. List of commands to implement
  6. Investigate merging with current BrexBot implementation, including potential account ownership/transfer.

Reach in the #bot-development channel in the Discord for questions on joining the project.

Set up the database

The bot uses the Prisma ORM for persistence. By default this uses SQLite.

See the duel commend for database integration examples.

The schema for the Database is stored in the Prisma schema file.

Create the client definition

npx prisma generate

Create a new empty Database for development

npx prisma migrate dev --name init

Open the file with sqlite

sqlite3 prisma/dev.db

For better output in sqlite enable columns and headers. You can also hardcode these settings in the ~/.sqliterc file.

sqlite> .mode column
sqlite> .headers ON

How to run

Docker

Prerequisites:

  • Recent version of Docker

Build the image

docker build -t brexbot .

Create a .env file which contains the bot token

DISCORD_TOKEN=<token>

Start the container

docker run --rm --env-file.env -ti brexbot

Locally

Prerequisites:

  • Node.js >= 16

Install the dependencies

npm install

Export the bot token as an environment variable

# Bash and similar
export DISCORD_TOKEN=<token>
# Powershell 
$Env:DISCORD_TOKEN = "<token>"

Run the bot

npm run start

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.5%
  • Other 0.5%