"""Automatically delete non-media messages in media channels and add 📌 reaction to media messages"""
120
+
asyncdefon_message(self, message: discord.Message): # known bug: wont act as media channel if channel contains text 'original' or 'selfies'
121
+
"""Automatically delete non-media messages in media channels | add 📌 and/or 🍪 reaction to media messages"""
122
+
ifmessage.channel.name.find('original') >-1ormessage.channel.name.find('selfies') >-1: # looks for the position of substring. if it's not found, this returns -1.
awaitmessage.add_reaction('📌') # doesn't check if channel is private, only if media isn't in the name
138
145
return
139
146
try:
147
+
awaitmessage.channel.send(f'<@{message.author.id}> Sorry, you can\'t talk in media channels, but you can start a thread! if you posted media, try again and make sure it embedded properly',
148
+
delete_after=8)
140
149
awaitmessage.delete()
141
-
awaitmessage.channel.send('Unfortunately, you can\'t talk in media channels. You have to send either \
142
-
an attachment or embed with your message. If you sent a link, discord timed out and didn\'t embed the message. \
143
-
(discord can struggle to do this when the file size is large, especially when their servers are being slow). \
144
-
You can try again, or you can download whatever is at the link and upload it to discord manually. Don\'t be afraid to \
145
-
try multiple times. This is all a discord limitation we can\'t do anything about at the moment. Sorry :(',
146
-
delete_after=12)
147
-
exceptdiscord.NotFound:
148
-
# Message was already deleted.
150
+
exceptdiscord.NotFound: # Message was already deleted.
visit in the meantime as well. Thank you for your understanding.
58
55
''')
59
56
60
-
@commands.command()
57
+
@commands.hybrid_command()
61
58
asyncdefmodmail(self, ctx):
62
59
"""copypasta command explaining modmail"""
63
-
awaitctx.message.delete()
64
60
awaitctx.send('''\
65
61
# How do I contact the GBJ staff?
66
62
Head to <#1172337920431104053>, and click `Open a ticket!`. This will put you in a channel with staff only, where you can express your concerns.
@@ -71,10 +67,9 @@ async def modmail(self, ctx):
71
67
If you believe it's urgent, and the server is in danger, you may message any of the available babysitters individually. Abusing this may result in a warning.
awaitctx.send(f'Here\'s a list of our stamp packs!\nType `{self.bot.command_prefix}[pack-name]` to see a list of the stamps inside of that pack.```{categories}``` Also, you can add stamps in the `!shop`!'.strip())
206
+
awaitctx.send(f'Here\'s a list of our stamp packs!\nType `{self.bot.command_prefix}[pack-name]` to see a list of the stamps inside of that pack.```{categories}``` Also, you can add stamps in the `!shop`!\nPlease note that these cannot be invoked as a / command'.strip())
0 commit comments