diff options
| author | seth <[email protected]> | 2022-12-26 03:23:14 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2022-12-26 03:44:17 -0500 |
| commit | d06defd8d7561d90ecbf7cfb4d5e4778a348e98e (patch) | |
| tree | 0054f5b704bfb0f9a21cc6d2626a62a7c1594d3e /src | |
| parent | e16a396db9aa0ac707654d8f03c0c8a3b05b7c9f (diff) | |
chore: replace flake8 with pylint, refactor, add pre-commit
Diffstat (limited to 'src')
| -rw-r--r-- | src/moyai_bot/__init__.py (renamed from src/moyaiBot/__init__.py) | 3 | ||||
| -rw-r--r-- | src/moyai_bot/bot.py (renamed from src/moyaiBot/moyaiBot.py) | 7 | ||||
| -rw-r--r-- | src/moyai_bot/lib.py (renamed from src/moyaiBot/lib.py) | 3 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/moyaiBot/__init__.py b/src/moyai_bot/__init__.py index dad1ed9..0820f2a 100644 --- a/src/moyaiBot/__init__.py +++ b/src/moyai_bot/__init__.py @@ -1,5 +1,6 @@ import os -from .moyaiBot import moyai + +from .bot import moyai TOKEN = os.getenv("TOKEN") diff --git a/src/moyaiBot/moyaiBot.py b/src/moyai_bot/bot.py index f09700a..8a152a8 100644 --- a/src/moyaiBot/moyaiBot.py +++ b/src/moyai_bot/bot.py @@ -1,9 +1,10 @@ import discord from discord.ext import commands -from moyaiBot.lib import get_random_response + +from moyai_bot.lib import get_random_response intents = discord.Intents.default() -intents.message_content = True +intents.message_content = True # pylint: disable=assigning-non-slot moyai = commands.Bot(command_prefix="m!", description="moyai", intents=intents) @@ -37,6 +38,6 @@ async def ask(ctx): @moyai.command() async def moyaispam(ctx): msg = str() - for i in range(30): + for _ in range(30): msg += str(discord.utils.get(moyai.emojis, name="moyai")) await ctx.send(msg) diff --git a/src/moyaiBot/lib.py b/src/moyai_bot/lib.py index 899a906..c7ec164 100644 --- a/src/moyaiBot/lib.py +++ b/src/moyai_bot/lib.py @@ -1,6 +1,7 @@ -import discord import random +import discord + def get_random_response(moyai): responses = [ |
