From d16aeee4c046a55f03a34a0993bd0c1589c380a2 Mon Sep 17 00:00:00 2001 From: ddorn Date: Thu, 30 Apr 2020 21:22:17 +0200 Subject: [PATCH] :fire: clenup imports --- src/cogs/dev.py | 10 ++++------ src/cogs/misc.py | 2 -- src/cogs/teams.py | 2 +- src/cogs/tirages.py | 2 +- src/core.py | 2 -- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/cogs/dev.py b/src/cogs/dev.py index 89237f2..9b35af8 100644 --- a/src/cogs/dev.py +++ b/src/cogs/dev.py @@ -1,12 +1,9 @@ import code -import sys -from importlib import reload from pprint import pprint import discord -from discord import Colour, TextChannel, PermissionOverwrite -from discord.ext.commands import command, has_role, Bot, has_any_role -from discord.ext.commands import Cog +from discord import TextChannel, PermissionOverwrite +from discord.ext.commands import command, has_role, Bot, Cog from discord.utils import get from src.constants import * @@ -168,9 +165,10 @@ class DevCog(Cog, name="Dev tools"): await ctx.send(str(jury_channel)) - @command(name="send", hidden=True) + @command(name="send") @has_role(Role.DEV) async def send_cmd(self, ctx, *msg): + """Envoie un message.""" await ctx.message.delete() await ctx.send(" ".join(msg)) diff --git a/src/cogs/misc.py b/src/cogs/misc.py index 4a02e2c..16767fd 100644 --- a/src/cogs/misc.py +++ b/src/cogs/misc.py @@ -11,13 +11,11 @@ from discord.ext.commands import ( Cog, command, Context, - Bot, Command, CommandError, Group, ) -from src import utils from src.constants import * from src.constants import Emoji from src.core import CustomBot diff --git a/src/cogs/teams.py b/src/cogs/teams.py index 74578b2..047f30d 100644 --- a/src/cogs/teams.py +++ b/src/cogs/teams.py @@ -3,7 +3,7 @@ from typing import List, Tuple import discord from discord.ext import commands -from discord.ext.commands import Cog, Bot, group, Context +from discord.ext.commands import Cog, group, Context from discord.utils import get, find from src.constants import * diff --git a/src/cogs/tirages.py b/src/cogs/tirages.py index 63a9b63..72443b0 100644 --- a/src/cogs/tirages.py +++ b/src/cogs/tirages.py @@ -5,7 +5,7 @@ import random from collections import defaultdict, namedtuple from io import StringIO from pprint import pprint -from typing import Type, List, Dict +from typing import Type, Dict import discord import yaml diff --git a/src/core.py b/src/core.py index a9894c4..575384f 100644 --- a/src/core.py +++ b/src/core.py @@ -2,11 +2,9 @@ import asyncio import sys from importlib import reload -import psutil from discord import User, Message, Reaction from discord.ext.commands import Bot - __all__ = ["CustomBot"] from discord.utils import get