Giter Site home page Giter Site logo

lemongrab360 / blazebot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from btarg/blazebot

0.0 0.0 0.0 107 KB

A multipurpose, semi-modular Discord bot written in Python.

Home Page: https://icrazyblaze.github.io/BlazeBot

License: MIT License

Batchfile 1.60% Python 96.97% Shell 1.44%

blazebot's Introduction

BlazeBot 2 (beta)

A multipurpose, semi-modular Discord bot written in Python with the new discord.py module.

Discord.py Python BlazeBot

Installing dependencies

The following packages are required to run (as well as Python 3.5 or over):

python -m pip install -r requirements.txt

To easily setup BlazeBot and change tokens and API keys at any time, you should use the Setup.py script.

Not working? Try replacing python with py or python3.

Downloading the source code

To download with Git, type this command into a terminal:

git clone https://github.com/iCrazyBlaze/BlazeBot

Alternatively, you can use the GitHub Desktop Client to download it.

You can also download the repository as a ZIP or TAR file.

If you're on Linux and you want to be able to easily clone and update BlazeBot, you can use this script which will remove the BlazeBot directory if it exists (otherwise it will just say "directory not found") before using the git clone command to download the code. This has proved really useful for me when I'm using multiple machines.

To run the script on Windows with Git Bash, delete sudo from the first line and it should run.

Setting up and config

BlazeBot comes with a config.py file. Here you will add your Discord App token, and add startup extensions. You can generate a token at https://discordapp.com/developers/applications/me.

Find the string "token here" in the config file and replace it with your token.

In the config.py file, you can also customise insults, error messages, bot prefix, bot description and the file you want the bot to log events to.

Creating an extension (cog)

Inside the misc folder, you will find templates for commands and cogs.

Replace test with the command category's name. Also, make sure the extension's filename the same as this, to avoid confusion.

You can refer to this documentation for how to create a cog, but make sure to replace all instances of bot with client, as this is what BlazeBot uses.

Loading/Unloading an extension (cog)

Use the command load to load commands from startup_extensions in config.py. You can unload them separately with the unload command.

You can also load cogs from a folder, by using the format: folder.filename

BlazeBot's plugins are found in the cogs folder.

Starting the bot

You can start the bot by launching BlazeBot.py directly, or using a Python IDE such as Thonny.

Inviting to servers

Use the Discord Permissions Calculator to invite the bot to your server using the ID printed to the console, and make sure that it has admin permissions.

If you want to invite your bot to other people's servers, make sure to tick "Public bot" on the Apps page.

Tips

Make sure to always update BlazeBot. You can create GitHub Webhooks for Discord to get notified whenever a repo is updated.

When you do this, always keep a backup! It's also useful to write down your token, but NEVER give this to anyone you don't trust, or publish it to your GitHub. Don't worry though - you can generate a new token whenever you want on the Discord developer portal.

To read and edit this document properly offline, Atom and VS Code both have a built-in Markdown Previewer that you can open by hitting ctrl + shift + v on a PC or cmd + shift + v on a Mac.

See Also

See the discord.py repo for more information on the API: https://github.com/Rapptz/discord.py

blazebot's People

Contributors

btarg 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.