Giter VIP home page Giter VIP logo

saybah-bot's Introduction

saybah-bot

Yet Another Open Source Discord Bot

Prerequistes

I made this bot in Linux, so I don't know what problems will occur running it on Windows or MacOS. Also, make sure you are running Python 3.8 or later. As of writing this, I am currently using Python 3.10.6.

We also need to make sure the following packages are installed on your system:

These packages are all needed for discord voice support and music playing. Unfortunately, none of those links tell you how to install these packages, so here is a quick guide:

Installing Required Packages

Debian Based Distros

sudo apt update && sudo apt install ffmpeg libffi-dev python3-dev

Arch Based Distros

sudo pacman -S ffmpeg libffi

Note: Arch ships header files with the regular package, so there are no -dev packages to worry about. More info here.

Fedora

First, you need to configure the RPMfusion repository in order to install ffmpeg. To do so, you can use the two commands from this article:

sudo dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf -y install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Then, dnf should be able to handle the rest:

sudo dnf updateinfo && sudo dnf install ffmpeg libffi-devel python3-devel

Setting Up and Running the Bot

First we need to create a simple virtual environment.

python3 -m venv bot-env
source bot-env/bin/activate

Then install the modules in requirements.txt:

pip install -r requirements.txt

Note: I want to also make an optional conda install, since I prefer conda to venv, and since some packages like libffi are available through conda, which might make everyone's lives easier. However, I found that some of the needed packages were not available through conda, so whether this will ever be implemented is up in the air.

One more step. Create a file named .env with variable token equal to your Discord Bot code.

Example:

File: .env
----------
token = 42069694206969.42069694206969.42069694206969

Now we're ready. Just run main.py and you should be all set

python3 main.py

saybah-bot's People

Contributors

a-h-nguyen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.