Skip to content

mmerfort/twiggy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust port of TwiggyBot just for fun

I was curious to see what the bot would look like in Rust, after someone mentioned the "rewrite it in rust" meme for the bot. I'm pretty surprised by the result, I honestly expected it to be a lot more verbose.

How to run

Prerequisites:

In order to compile the project a database needs to be setup. For that your need to install the SQLx CLI.

cargo install sqlx-cli

Then create the database and run the migrations with:

sqlx database create
sqlx migrate run

Now you just need to provide a valid Discord Token.

# Linux and MacOS
export DISCORD_TOKEN=<token>
# Powershell
$Env:DISCORD_TOKEN="<token>"

And then run the bot.

cargo run
# or in the release mode if you're a try-hard
cargo run --release

Extra commands

To use the /ask command you need to set WOLFRAM_APP_ID to a valid Wolfram Alpha APP ID in the environment variables.

You can get one here: https://developer.wolframalpha.com/

About

Rust port of TwiggyBot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%