diff options
author | Mango0x45 <thomasvoss@live.com> | 2020-08-11 12:38:25 +0000 |
---|---|---|
committer | Mango0x45 <thomasvoss@live.com> | 2020-08-11 12:38:25 +0000 |
commit | 85ce3053a69c5e62fe6775563b8a7fddba9c071e (patch) | |
tree | 6246239c2748dd39d570f045c82492e7e4ed7de5 /cogs | |
parent | 483bd6fb989d0538ee5ebdc167977dbe3e351f97 (diff) | |
download | steve-bot-85ce3053a69c5e62fe6775563b8a7fddba9c071e.tar steve-bot-85ce3053a69c5e62fe6775563b8a7fddba9c071e.tar.gz steve-bot-85ce3053a69c5e62fe6775563b8a7fddba9c071e.tar.bz2 steve-bot-85ce3053a69c5e62fe6775563b8a7fddba9c071e.tar.lz steve-bot-85ce3053a69c5e62fe6775563b8a7fddba9c071e.tar.xz steve-bot-85ce3053a69c5e62fe6775563b8a7fddba9c071e.tar.zst steve-bot-85ce3053a69c5e62fe6775563b8a7fddba9c071e.zip |
Organized imports
Diffstat (limited to 'cogs')
-rwxr-xr-x | cogs/admin.py | 7 | ||||
-rwxr-xr-x | cogs/general.py | 14 | ||||
-rwxr-xr-x | cogs/logs.py | 2 | ||||
-rw-r--r-- | cogs/player.py | 10 | ||||
-rwxr-xr-x | cogs/src.py | 14 | ||||
-rwxr-xr-x | cogs/trans.py | 5 | ||||
-rwxr-xr-x | cogs/twitter.py | 6 | ||||
-rwxr-xr-x | cogs/utils.py | 25 | ||||
-rwxr-xr-x | cogs/webserver.py | 9 |
9 files changed, 49 insertions, 43 deletions
diff --git a/cogs/admin.py b/cogs/admin.py index 4df537a..b315a94 100755 --- a/cogs/admin.py +++ b/cogs/admin.py @@ -1,10 +1,11 @@ -from discord.ext import commands -import discord import asyncio import json -import git import os +import discord +import git +from discord.ext import commands + class Admin(commands.Cog): def __init__(self, bot): diff --git a/cogs/general.py b/cogs/general.py index aa61d9c..fc92070 100755 --- a/cogs/general.py +++ b/cogs/general.py @@ -1,11 +1,15 @@ -from discord.ext import commands
-import discord
import datetime
-import requests
+import inspect
import json
-import dateutil.parser
+import os
+import sys
from random import randint
-import os, sys, inspect
+
+import dateutil.parser
+import discord
+import requests
+from discord.ext import commands
+
current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parent_dir = os.path.dirname(current_dir)
sys.path.insert(0, parent_dir)
diff --git a/cogs/logs.py b/cogs/logs.py index 4f6aab1..21516be 100755 --- a/cogs/logs.py +++ b/cogs/logs.py @@ -1,5 +1,5 @@ -from discord.ext import commands import discord +from discord.ext import commands class Logs(commands.Cog): diff --git a/cogs/player.py b/cogs/player.py index 8a0eb97..605d5ef 100644 --- a/cogs/player.py +++ b/cogs/player.py @@ -18,19 +18,17 @@ e.g You might like to implement a vote before skipping the song or only allow ad Music bots require lots of work, and tuning. Goodluck. If you find any bugs feel free to ping me on discord. @Eviee#0666 """ -import discord -from discord.ext import commands - import asyncio import itertools import sys import traceback -from async_timeout import timeout from functools import partial -from youtube_dl import YoutubeDL from pathlib import Path -from discord.ext import tasks +import discord +from async_timeout import timeout +from discord.ext import commands, tasks +from youtube_dl import YoutubeDL ytdlopts = { 'format': 'bestaudio/best', diff --git a/cogs/src.py b/cogs/src.py index b19c96c..fe62e4d 100755 --- a/cogs/src.py +++ b/cogs/src.py @@ -1,13 +1,13 @@ -from discord.ext import commands -from discord.ext import tasks -from discord.utils import get +import asyncio +import json from datetime import timedelta +from pathlib import Path + +import dateutil.parser import discord import requests -import json -import asyncio -import dateutil.parser -from pathlib import Path +from discord.ext import commands, tasks +from discord.utils import get async def rejectRun(self, apiKey, ctx, run, reason): diff --git a/cogs/trans.py b/cogs/trans.py index 9ca1004..965f68e 100755 --- a/cogs/trans.py +++ b/cogs/trans.py @@ -1,7 +1,8 @@ -from discord.ext import commands import discord -from google.cloud import translate_v2 as translate import six +from discord.ext import commands +from google.cloud import translate_v2 as translate + translate_client = translate.Client() async def translateMsg(text, target="en"): diff --git a/cogs/twitter.py b/cogs/twitter.py index 67e792a..0688380 100755 --- a/cogs/twitter.py +++ b/cogs/twitter.py @@ -1,8 +1,10 @@ import json -from discord.ext import commands, tasks + import discord -import tweepy import requests +import tweepy +from discord.ext import commands, tasks + class StreamListener(tweepy.StreamListener): def __init__(self): diff --git a/cogs/utils.py b/cogs/utils.py index 7403110..2261edd 100755 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -1,21 +1,20 @@ -from discord.ext import commands -from discord.ext import tasks -import discord -import json +import asyncio import datetime +import functools +import json +from datetime import timedelta # forgot to import this and ended up looking mentally unstable # troll literally pointed out atleast 4 things I did wrong in 3 lines of code -from random import choice -from random import randint -from datetime import timedelta -from selenium import webdriver -from selenium.webdriver.chrome.options import Options +from random import choice, randint + +import discord +from discord.ext import commands, tasks #from PIL.Image import core as Image #import image as Image -from PIL import Image -from PIL import ImageFilter -import functools -import asyncio +from PIL import Image, ImageFilter +from selenium import webdriver +from selenium.webdriver.chrome.options import Options + def set_viewport_size(driver, width, height): window_size = driver.execute_script(""" diff --git a/cogs/webserver.py b/cogs/webserver.py index 3061f8f..d9c92cf 100755 --- a/cogs/webserver.py +++ b/cogs/webserver.py @@ -1,9 +1,10 @@ -from aiohttp import web -from discord.ext import commands, tasks -import discord +import json import os + import aiohttp -import json +import discord +from aiohttp import web +from discord.ext import commands, tasks app = web.Application() routes = web.RouteTableDef() |