Skip to content

Commit adb921c

Browse files
authored
Merge pull request #32 from matthewflegg/dev
Reorganised utils folder and fixed dependency error
2 parents 7654411 + 117be46 commit adb921c

35 files changed

+626
-618
lines changed

cogs/admin/admin_cog.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
"""
44

55
import asyncio
6-
76
import discord
7+
88
from discord.ext import commands
9-
from utils.buttons import BlacklistClearButton, BlacklistRemoveView, ClearMessagesView, DropdownView
10-
from utils.functions import lift_ban, sanction
9+
from utils import BlacklistClearButton, BlacklistAddView, BlacklistRemoveView, ClearMessagesView, lift_ban, sanction
1110

1211
FILEPATH = "files/blacklist.json"
1312

@@ -117,7 +116,7 @@ async def blacklist(self, ctx: commands.Context, *, words: str=None):
117116
```
118117
"""
119118
if not words:
120-
view = DropdownView(ctx)
119+
view = BlacklistAddView(ctx)
121120
embed = discord.Embed(
122121
title="🛠️ Please enter one or more words to blacklist."
123122
)

cogs/help/help_cog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"""
44

55
import sys
6-
76
import discord
7+
88
from discord.ext import commands
99
from .help_command import HelpCommand
1010

cogs/help/help_command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
Sends an embedded, custom, help command.
33
"""
44

5-
from typing import Optional
65
import discord
76

7+
from typing import Optional
88
from discord.ext import commands
99
from discord import app_commands
1010

cogs/misc/misc_cog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from typing import Optional
1111
from discord.ext import commands
12-
from utils.models import TwitchBroadcast
12+
from utils import TwitchBroadcast
1313

1414

1515
class MiscCog(commands.Cog, name="Misc"):

files/blacklist.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"953054451999072276": [
3-
"asshole",
43
"arse"
54
]
65
}

handlers/task_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import threading
2-
32
import discord
3+
44
from discord.ext import commands, tasks
55

66
# JSON file containing reaction role data

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import dotenv
1414

1515
from discord.ext import commands
16-
from utils.models import Cache, Twitch
16+
from utils import Cache, Twitch
1717

1818

1919
def get_prefix(bot: commands.Bot, message: discord.Message):

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ yarl==1.7.2
2626
youtube-dl==2021.12.17
2727
pillow==9.0.1
2828
humanize
29+
black
2930
jishaku @ git+https://github.com/Gorialis/jishaku

slash_cogs/misc/__init__.py

Whitespace-only changes.

slash_cogs/misc/misc_cog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
import datetime
66
import random
7-
87
import discord
98
import humanize
9+
1010
from discord import app_commands
1111
from discord.ext import commands
12-
from utils.models import TwitchBroadcast
12+
from utils import TwitchBroadcast
1313

1414

1515
class SlashMiscCog(commands.Cog):

0 commit comments

Comments
 (0)