项目作者: chisenoa

项目描述 :
🪐 A simple Discord Bot that offers features of popular bots for free
高级语言: Python
项目地址: git://github.com/chisenoa/oreskis.git
创建时间: 2021-01-20T16:40:37Z
项目社区:https://github.com/chisenoa/oreskis

开源协议:MIT License

下载




If you need help you can contact me here 🪐

Requirements

Useful to always have

Keep this saved somewhere, as this is the docs to discord.py@rewrite.
All you need to know about the library is defined inside here, even code that I don’t use in this example is here.

How to setup

  1. Make a bot here and grab the token

Image_Example1

  1. Rename the TOKEN in oreskis.py, then fill in the required spots, such as token, prefix and game

  2. To install what you need, do pip install -r requirements.txt

    (If that doesn’t work, do python -m pip install -r requirements.txt)

    NOTE: Use pip install with Administrator/sudo

  3. Start the bot by having the cmd/terminal inside the bot folder and type python oreskis.py

  4. You’re done, enjoy your bot!

FAQ

Q: I don’t see my bot on my server!

A: Invite it by using this URL: https://discordapp.com/oauth2/authorize?client_id={CLIENT_ID}&scope=bot

Remember to replace CLIENT_ID with your bot client ID

Q: There aren’t that many commands here…

A: Yes, I will only provide a few commands to get you started, maybe adding more later.

Optional tools

Flake8

Flake8 is a tool that helps you keep your code clean. Most coding softwares will have a plugin that supports this Python module so it can be integrated with your IDE. To install it, simply do pip install flake8. If you’re using python 3.7, install by doing pip install -e git+https://gitlab.com/pycqa/flake8#egg=flake8

PM2

PM2 is an alternative script provided by NodeJS, which will reboot your bot whenever it crashes and keep it up with a nice status. You can install it by doing npm install -g pm2 and you should be done.

  1. # Start the bot
  2. pm2 start pm2.json
  3. # Tips on common commands
  4. pm2 <command> [name]
  5. start oreskis.py # Run the bot again if it's offline
  6. list # Get a full list of all available services
  7. stop oreskis.py # Stop the bot
  8. reboot oreskis.py # Reboot the bot

Docker

Docker is an alternative to run the bot 24/7 and always reboot again whenever it crashed. You can find the install manual here. You don’t have to get it, but if you’re used to having Docker, it’s available at least.

  1. # Build and run the Dockerfile
  2. docker-compose up -d --build
  3. # Tips on common commands
  4. docker-compose <command>
  5. ps # Check if bot is online or not (list)
  6. down # Shut down the bot
  7. reboot # Reboot the bot without shutting it down or rebuilding
  8. logs # Check the logs made by the bot.

Repl.it

You can run this on Repl.it! Make sure to setup oreskis.py in the way stated above.