Git Product home page Git Product logo

likahbot's Introduction

LikahBot

Trello board

What is LikahBot?

LikahBot is an open source general purpose Discord bot utilising the Pycord library. It's a project I originally started when I had minimal knowledge about programming practices. This repository is the complete rewrite of that original project.

How do I use the bot?

Do note that the bot is in a very very early stage of development currently and following the instructions below will not yet guarantee a usable bot.

Instructions for Linux users

  1. Clone the repository
  2. Navigate to the root of the cloned directory
  3. Create a new virtual environment
  • e.g. python3 -m venv botenv
  1. Launch the virtual environment
  • e.g. source botenv/bin/activate
  1. Install the required dependencies
  • python3 -m pip install -r requirements.txt -U
  1. Initialize the bot's database
  • sqlite3 database/database.db < database/schema.sql
  • Change the DB_ADDRESS constant in constants.py to reflect whatever name you gave the database
  1. Change the DEBUG_GUILDS constant in constants.py to []
  • If you're not going to make the bot public, you can also list the IDs of the guilds you're going to use the bot on
  • Note that making a slash command public may take a while to register
  1. Create a new application and bot user through Discord Developer Portal
  2. Invite the bot to your Discord server
  • e.g. use link: https://discord.com/oauth2/authorize?client_id=[your client id here]&scope=bot%20applications.commands&permissions=[your permission integer here]
  • Select your server from the list
  1. Get your bot's secret token from the developer portal and keep it safe
  2. Launch the bot
  • python3 src/bot.py [your secret token here]
  • Optional ways to launch in the next steps

Option 1: Environmental variables

  1. Create a new environmental variable
  • e.g. export BOT_TOKEN=[your secret token here]
  1. Launch the bot using the environmental variable
  • e.g. python3 src/bot.py $BOT_TOKEN

Option 2: Encrypted file and the run.sh script

  1. Install gnupg on your system
  2. Create an extensionless file to store your token
  • echo [insert your token] > token
  1. Encrypt your token file
  • gpg -c token
  • Come up with a strong enough password. You'll be needing it to launch the bot in the future.
  • A file called token.gpg should be created in the root directory
  1. Delete the original token file
  2. To run the bot, use ./run.sh (make sure you give it permission to execute)
  • Type in the password if asked

Updating the database

If your bot uses an old version of the database, some features may not work correctly, or you may experience bugs that later versions of the database fixed.

To update your database to the latest version, just run: python3 database/db_updater.py path/to/your/database

This will update your database to the latest version.

Do note that the updater is currently untested in practical applications of the bot so it is recommended to make a backup of your database before running the updater to prevent any loss of data. If you encounter issues, make sure to create an issue.

Planned features

  • Dashboard
  • Automod
  • Logging
  • Verification
  • Moderation commands
  • Punishment histories
  • Reminders
  • Birthday wishes
  • Raffles and polls
  • Experience and leveling
  • Currency and economy
  • and much more

likahbot's People

Contributors

veloxization avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

trissiethehusky

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.