Skip to content

Yet, another Discord Bot aiming to help / teach people about Linux.

License

Notifications You must be signed in to change notification settings

TrackRunny/LinuxBoi

Repository files navigation

→ LinuxBoi

Python Versions Discord.py Version License: GPL v3 Uptime - Current Time Code Quality

➤ Important Information

  • Official GitHub repository for LinuxBoi.
  • Multi-use Discord bot that is being actively developed and worked on.
  • Main purpose is to teach / help people about Linux on Discord.
  • 2 - 3 commits each week.
  • Uptime badge to show if the bot is currently online or offline.

➤ Modules

  • Events
  • Fun
  • Information
  • Meme
  • Moderation
  • Music (Lavalink.py for good sound quality)
  • Owner
  • Utility

➤ Installation

Please note that I would rather have you not run another instance of the bot and just Invite it to your server. If you really want to run it with your own token for testing or another reason, please follow the directions below to run it.

Also note that MAC OS X CANNOT* run Lavalink Server due to a missing library that is required to run it. You can attempt to run Lavalink Server on it, but when you try to play sound nothing will come out. You should get an error like this: java.lang.UnsatisfiedLinkError: Required library at /natives/darwin/libudpqueue.dylib was not found. Currently Lavalink Server supports Windows and Linux. Lavalink.py does support Mac OS X, however this is a wrapper for Lavalink server. Lavalink server allows you to play sound with the bot.

* Its not impossible to try and compile Lavalink.jar with Mac natives up and running, though it has been done before but I personally have never tried it.


There is a requirements.txt file that anyone on Any Operating That Supports Python 3.7+ can use to install All of the dependencies needed for LinuxBoi to run. If your computer / server has two versions of python and / or you have python 2 and python 3 installed make sure to use python 3.7+. Installation instructions are below as follows:

  • First, clone this repository and install the dependencies from the txt file.
git clone https://github.com/TrackRunny/LinuxBoi.git

cd LinuxBoi

pip install --user --requirement requirements.txt
<!-- Remember: Only use this if you only have python 3 installed. -->

or

pip3 install --user --requirement requirements.txt
<!-- Remember: Use this if you have two versions of python and / or you have python 2 and python 3. -->  

IF YOUR USING WINDOWS PLEASE READ THIS PORTION BELOW!

Click here

➤ Error: Microsoft Visual C++ 14.0 is required.

Note, some users may receive this error above when trying to install the dependencies from the requirements.txt file. This happens when you are trying to build and install the Pycosat pip module. If this happens to you, please follow the instructions below.

  1. Download the compiled Pycosat file for your Python version and windows architecture.
  2. Change directories into the downloaded file.
  3. Install the compiled pip module.
  pip install pycosat-0.6.3-cp37-cp37m-win32.whl
  <!-- Win32 | Python 3.7 -->

  pip install pycosat-0.6.3-cp37-cp37m-win_amd64.whl
  <!-- Win64 | Python 3.7 -->
  
  ---
  
  pip install pycosat-0.6.3-cp38-cp38-win32.whl
  <!-- Win32 | Python 3.8 -->

  pip install pycosat-0.6.3-cp38-cp38-win_amd64.whl
  <!-- Win64 | Python 3.8 -->

  or

  pip3 install pycosat-0.6.3-cp37-cp37m-win32.whl
  <!-- Win32 | Python 3.7 | pip3 -->

  pip3 install pycosat-0.6.3-cp37-cp37m-win_amd64.whl
  <!-- Win64 | Python 3.7 | pip3 -->

  ---

  pip3 install pycosat-0.6.3-cp38-cp38-win32.whl
  <!-- Win32 | Python 3.8 | pip3 -->

  pip3 install pycosat-0.6.3-cp38-cp38-win_amd64.whl
  <!-- Win64 | Python 3.8 | pip3-->

➤ Environment Variables (Continuing Installation)

There are some environment variables you need to have on the computer / server that is running the Discord bot. If you don't have these the bot will not work correctly!

I have created a copy and paste area for all the environment variables that you need for this bot. The instructions are below depending on which operating system you currently use.

Linux (Click the arrow)

➤ Environment Variables On Linux

Linux: Put the variables at the end of your .bashrc file. The .bashrc file is located in your home directory. You can copy and paste these and put in the values. These are located under the Windows instructions inside the code block.

Here is an example of what it should look like.

Mac OS X (Click the arrow)

➤ Environment Variables On Mac

Mac OS X: Put the variables at the end of your .bash_profile file. The .bash_profile is located in your home directory. You can copy and paste these and put in the values. These are located under the Windows instructions inside the code block.

Here is an example of what it should look like.

Windows (Click the arrow)

➤ Environment Variables On Windows

Windows: The process is a little more difficult on Windows. Please watch this video so you can export these values on your Windows Operating System. Skip to 1:19 if you want to see how he does it. Make sure to keep the enviroment variables with the same name or they won't work. The variable names are inside the code block just under this piece of text.

export ip_info=""
export email=""
export email_password=""
export bitly_access_token=""
export weather_key=""
export ksoft_key=""
export top_gg_key=""
export linuxboi_token=""
export linuxboi_testing_token=""

➤ List of Api's (Continuing Installation)

These are all of the api's I use inside LinuxBoi.

  1. Ip Info (Free; Sign up to receive an api key)

  2. Bitly (Free; Sign up to receive a generic access token)

  3. Open Weather API (Free; Sign up the receive an api key)

  4. KSoft.Si API (Free; Sign up to receive an api token)

  5. TopGG API (Free; Sign up to receive an api token)

  6. Gmail (Free; Sign up, use account email and password)

You need to put these values inside the environment variables. You also need to provide a bot token for the linuxboi_token, and linuxboi_testing_token enviroment variables too.

➤ Finishing Installation

Congrats, everything should be set up correctly so far. If you want to start the bot you can do ./LinuxBoi.py or python LinuxBoi.py or python3 LinuxBoi.py as it should already be executable for linux.

Don't forget to start Lavalink server too! To do this you can change directories into cd Music/. After that you can do java -jar Lavalink.jar. Note: You need to have Java 13 to run this correctly. I would recommend starting Lavalink server before starting the bot as you won't get the [NODE-us-127.0.0.1:2333] Failed to establish connection! error when you start the bot before Lavalink server is running.


➤ License

This project is licensed under the GPLv3.

➤ Questions / Contact me

  • Discord Account: TrackRunny#2503

About

Yet, another Discord Bot aiming to help / teach people about Linux.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •