Skip to content

Commit 1ca12af

Browse files
committed
another pin accuarcy fix
1 parent dc697a2 commit 1ca12af

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

cogs/help/pin.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55

66
from utils.msg_utils import Emojis
77
from utils.shortcuts import no_ping
8-
from utils.validator import validate
98

10-
valid_pin = {
11-
"pin": ["пин", "закреп", "закрепи", "закрепить", ":pushpin:", "pushpin", "📌", "📍", "<:pushpin:1270666437496799254>"]
12-
}
9+
pin_aliases = ["пин", "закреп", "закрепи", "закрепить", ":pushpin:", "pushpin", "📌", "📍", "<:pushpin:1270666437496799254>"]
1310

1411

1512
class Pin(commands.Cog):
@@ -31,7 +28,7 @@ async def react_to_pin(self, reaction):
3128
async def message_pin(self, msg):
3229
if isinstance(msg.channel, discord.Thread) and msg.channel.parent_id in (HELP_FORUM_ID, CREATIONS_FORUM_ID) \
3330
and (msg.author == msg.channel.owner or msg.author.guild_permissions.manage_messages):
34-
if validate(msg.content, valid_pin, 3):
31+
if msg.content.strip().lower() in pin_aliases:
3532
try:
3633
replied_msg = await msg.channel.fetch_message(msg.reference.message_id)
3734
if replied_msg.pinned:

merge.bat

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
git checkout main
2+
git merge dev
3+
git push origin main
4+
git checkout dev

0 commit comments

Comments
 (0)