Skip to main content

Minor League E-Sports Franchise Utility bot base-code.

Project description

MLE Bot

MLE Bot is a Minor League E-Sports Franchise ready, python written Discord Bot.

:bulb: Features :bulb:

  • .env file for control over environments of your Franchise
  • sprocket connectivity to get latest public dataset data
  • roster channel support to automatically show your team off!
  • sprocket player lookup for easy player tracking/management
  • team-eligibility commands to stay on top of non-eligible players!
  • season stats to get pretty html/css images!

:dependabot: Setup :dependabot:

:warning: Attention: At this very moment, this setup is meant to run locally on a machine. This will run in a command console. If you close the console, the bot goes down. :warning:

You can find an example in the following github repo!

Start off by creating a new project and adding both this repository and PyDiscoBot to your project either directly or via PyPi! Super Easy!

pip install MLEBot
pip install PyDiscoBot

You can easily install the requirements via python's pip module!

pip install -r requirements.txt

:memo: Fill out the .env file to customize your bot! :memo:

Make sure to include these imports!

import discord
from discord.ext import commands
import dotenv
import os
import PyDiscoBot
from MLEBot import mle_commands, mle_bot

Create a custom class for your bot!

class MyBot(mle_bot.MLEBot):
    def __init__(self,
                 command_prefix: str | None = None,
                 bot_intents: discord.Intents | None = None,
                 command_cogs: [discord.ext.commands.Cog] = None):
        super().__init__(command_prefix=command_prefix,
                         bot_intents=bot_intents,
                         command_cogs=command_cogs)

To add functionality when the bot comes online, over-ride the on-ready function of the bot!

async def on_ready(self,
                       suppress_task=False) -> None:
        await super().on_ready(suppress_task)  # remember to call the parent class here!
        # do_some_code_here!!!

To add functionality to each of the bot's "ticks", over-ride the on_task function of the bot!

    async def on_task(self) -> None:
        await super().on_task()  # remember to call the parent class here!
        # do some task-y stuff here!

Run your file!

if __name__ == '__main__':
    dotenv.load_dotenv()

    intents = discord.Intents(8)
    # noinspection PyDunderSlots
    intents.guilds = True
    # noinspection PyDunderSlots
    intents.members = True
    # noinspection PyDunderSlots
    intents.message_content = True
    # noinspection PyDunderSlots
    intents.messages = True
    # noinspection PyDunderSlots
    intents.reactions = True

    bot = MyBot('ub.',
                intents,
                [PyDiscoBot.Commands,
                 mle_commands.MLECommands])

    bot.run(os.getenv('DISCORD_TOKEN'))

:computer: Development Status :computer:

Build - :construction: beta

Version - 1.0.4

Requirements

PyDiscoBot==1.0.4

:soccer: Join MLE Today! :soccer:

:sparkler: Main Site:

:postbox: Apply Today!:

:camera: Check out our twitter!:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlebot-1.0.6.tar.gz (166.4 kB view details)

Uploaded Source

Built Distribution

mlebot-1.0.6-py3-none-any.whl (169.0 kB view details)

Uploaded Python 3

File details

Details for the file mlebot-1.0.6.tar.gz.

File metadata

  • Download URL: mlebot-1.0.6.tar.gz
  • Upload date:
  • Size: 166.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.9

File hashes

Hashes for mlebot-1.0.6.tar.gz
Algorithm Hash digest
SHA256 535d2c32c0baecb97c610cc738d0792124767d298c5bcde33abaab7ff2329f70
MD5 0d8d3f94d3bfb922b8a1b848aa947717
BLAKE2b-256 24a4c9314735977a6ee254d38a437ba0331dea4c57ba931b367185fe330993c7

See more details on using hashes here.

File details

Details for the file mlebot-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: mlebot-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 169.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.9

File hashes

Hashes for mlebot-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 82565f5ec1cbbc0268670bb18725e276437bcc5403e745172112a1a9a615d0da
MD5 9ef033f898e964592fa0fc7bcf8ebaf3
BLAKE2b-256 fb3f19502ef3fd42a35146f928a3342e4178e3f0f83f922737c99c325f69f40d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page