Skip to content
/ Botto Public template

Template for bots written with discord.py 1.6.0 and Python 3.7+

License

Notifications You must be signed in to change notification settings

MusicOnline/Botto

Repository files navigation

Botto

Python discord.py License Issues Commits Discord

A template for bots written using discord.py. As much I'd like to release this on PyPI, it seems more logical for this git repository to be forked and worked off of. This project is very much still work in progress.

You may read the documentation for discord.py here. You can join the Discord server for support using this template.

Installation and usage

Requirements

  • Python 3.7 and above

Installation

  1. Fork this repository.

  2. Run this command in your command line:

    git clone https://github.com/{YOUR_USERNAME}/Botto.git
    cd Botto
    pip install pipenv
    pipenv install  # prepend "python3 -m" as necessary

    If your machine does not have git, you may download it here.

  3. Start hacking.

Usage

  1. Copy config-example.yml to config.yml in the same directory.
  2. Fill up all necessary configuration values.
  3. Run this command in your command line:
    pipenv run python -m botto  # prepend "python3 -m" as necessary
    Your bot should be online now.

Gateway intents

Discord now has Gateway Intents which help (or force) you to limit events received. Privileged intents require verification for bots in over 100 guilds. No intents are necessary to function but *_MESSAGES intents should be enabled to receive messages.

Configuration name Actual intent name
GUILDS same
MEMBERS GUILD_MEMBERS (Privileged)
BANS GUILD_BANS
EMOJIS GUILD_EMOJIS
INTEGRATIONS GUILD_INTEGRATIONS
WEBHOOKS GUILD_WEBHOOKS
INVITES GUILD_INVITES
VOICE_STATES GUILD_VOICE_STATES
PRESENCES GUILD_PRESENCES (Privileged)
GUILD_MESSAGES same
GUILD_REACTIONS GUILD_MESSAGE_REACTIONS
GUILD_TYPING GUILD_MESSAGE_TYPING
DM_MESSAGES DIRECT_MESSAGES
DM_REACTIONS DIRECT_MESSAGE_REACTIONS
DM_TYPING DIRECT_MESSAGE_TYPING

GUILDS intent

If enabled, statistics embeds from on_ready events and the botstats command will show the number of guilds, text channels and voice channels the bot is in.

MEMBERS privileged intent

If enabled, statistics embeds from on_ready events and the botstats command will show the number of guild members and unique users the bot can see. If the PRESENCES privileged intent is disabled, they will also show the number of bots it can see.

PRESENCES privileged intent

If enabled together with the MEMBERS privileged intent, statistics embeds from on_ready events and the botstats command will show the number of guild members, unique users and online users the bot can see.

GUILD_MESSAGES and DM_MESSAGES intents

If enabled, the bot can read sent messages and therefore execute commands in guild text channels and DM channels respectively.

GUILD_REACTIONS and DM_REACTIONS intents

If enabled, the bot will send a 🗑️ :wastebasket: reaction when the shell and eval commands create a gist. It will listen to it for gist deletion.

Contributing

Contributions are always welcome. You may also open issues on the issue tracker.
Please see CONTRIBUTING.md for further details.

About

Template for bots written with discord.py 1.6.0 and Python 3.7+

Topics

Resources

License

Stars

Watchers

Forks

Languages