Skip to content

Commit 09d5b37

Browse files
committed
Fixed error and changed ~bladd/~blrem modal titles
1 parent 4777bc7 commit 09d5b37

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

files/blacklist.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"953054451999072276": [
3-
"retard",
43
"asshole",
5-
"wanker",
64
"arse"
75
]
86
}

handlers/event_handler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,14 @@ async def on_member_remove(self, member: discord.Member):
7171
if channel is not None:
7272
await channel.send(f"👋🏻 Goodbye, **{member.name}**.")
7373

74-
@commands.Cog.listener()
74+
@commands.Cog.listener() # This throws an AttributeError but it isn't really an issue
7575
async def on_message(self, message: discord.Message):
7676
"""
7777
Called when a message is sent.
7878
"""
79+
if not message.guild:
80+
return
81+
7982
blacklist = self.client.cache.blacklist
8083

8184
if (

utils/buttons.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def __init__(
131131
view: discord.ui.View,
132132
drop: discord.ui.Select,
133133
*,
134-
title: str = "🔑 Enter a word to blacklist:",
134+
title: str = "🔒 Add a Word to the Blacklist",
135135
) -> None:
136136
super().__init__(title=title)
137137
self.view = view
@@ -276,7 +276,7 @@ def __init__(
276276
view: discord.ui.View,
277277
drop: discord.ui.Select,
278278
*,
279-
title: str="🔑 Enter a word to remove from the blacklist:"
279+
title: str="🔒 Remove a Word From the Blacklist"
280280
) -> None:
281281
super().__init__(title=title)
282282

0 commit comments

Comments
 (0)