anshulxyz / bodhi-bot-rs

A Discord bot for Buddhist scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bodhi Bot ☸️

A Discord bot for referencing Buddhist verses and texts.

Demo

If you have any issues with the bot, or have a suggestion. Feel free to contact me on twitter.com/anshulxyz

Scriptures

Dhammapada

Features:-

  • Fetch single verse
  • Fetch a random verse
  • Fetch a range of verses

Usage example

To use the bot, you have to @\mention the bot.

To get the 14th verse of the Dhammapada

@BodhiBot dhp 14

To get the verses from 103th till 105th of the Dhammapada

@BodhiBot dhp 103 105

To get a random verse from the Dhammapada

@BodhiBot dhp

Current translation in use is by Max Müller.

Invite

Invite the bot to your server using this link

Code

The code is written in Rust (v1.60.0).

Libraries:-

  1. Serenity, for Discord API
  2. Sea-ORM, for ORM to access SQLite Database

I am making the source code of this bot public to have it serve as an example of the usage of the above libraries. This bot was formerly in Python. A goal to rewrite it was to learn Rust.

If you're interested in building the source code, contact me on Twitter. You'll need an SQLite database that follows the schema defined in dhammapada.rs.

ToDo/Coming Soon

  1. More translations for Dhammapada
  2. Slash Commands
  3. More scriptures

About

A Discord bot for Buddhist scripts


Languages

Language:Rust 97.6%Language:Makefile 2.4%