From 5aa42faa6c37e5cd892f5f877607596302063627 Mon Sep 17 00:00:00 2001 From: Florian SYLVAIN Date: Sun, 7 Mar 2021 02:13:06 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20-=20Code=20cleaning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python/cmd_other.py | 2 -- python/cmd_twitch.py | 4 +--- python/main.py | 4 +--- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/python/cmd_other.py b/python/cmd_other.py index 0dffd28..57e9de7 100644 --- a/python/cmd_other.py +++ b/python/cmd_other.py @@ -3,10 +3,8 @@ import asyncio from discord.ext import commands from discord.ext.commands.cooldowns import BucketType - CD_ISSOU = 0 - class OtherCmds(commands.Cog): def __init__(self, bot): self.bot = bot diff --git a/python/cmd_twitch.py b/python/cmd_twitch.py index fa94734..bb20a0a 100644 --- a/python/cmd_twitch.py +++ b/python/cmd_twitch.py @@ -8,11 +8,9 @@ from discord.ext.commands.cooldowns import BucketType from emoji import demojize from twitch import TwitchClient - twitch_client = TwitchClient(client_id=ID_TWITCH, oauth_token=TOKEN_TWITCH) chats = dict() - def check_user(name): user = twitch_client.users.translate_usernames_to_ids([name]) if not user: @@ -115,4 +113,4 @@ class TwitchCmds(commands.Cog): def setup(bot): - bot.add_cog(TwitchCmds(bot)) \ No newline at end of file + bot.add_cog(TwitchCmds(bot)) diff --git a/python/main.py b/python/main.py index a61d1fd..6548624 100644 --- a/python/main.py +++ b/python/main.py @@ -2,11 +2,9 @@ from private import TOKEN_BOT from discord.ext import commands import discord - bot = commands.Bot(command_prefix='$') startup_extensions = ["cmd_other", "cmd_lol", "cmd_osu", "cmd_twitch"] - @bot.event async def on_ready(): default_activity = discord.Activity(type=discord.ActivityType.listening, name='$help') @@ -20,4 +18,4 @@ if __name__ == "__main__": bot.load_extension(extension) except Exception as e: print(e) - bot.run(TOKEN_BOT) \ No newline at end of file + bot.run(TOKEN_BOT)