Disable bridge

This commit is contained in:
Nexus 2023-08-07 12:52:49 +01:00
parent 4ceed2bd98
commit 7a3b3272f9
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -366,35 +366,35 @@ class Events(commands.Cog):
if not message.guild: if not message.guild:
return return
if message.channel.name == "femboy-hole": # if message.channel.name == "femboy-hole" and not message.author.bot:
payload = { # payload = {
"author": message.author.name, # "author": message.author.name,
"content": message.content, # "content": message.content,
"at": message.created_at.timestamp(), # "at": message.created_at.timestamp(),
"attachments": [ # "attachments": [
{ # {
"url": a.url, # "url": a.url,
"filename": a.filename, # "filename": a.filename,
"size": a.size, # "size": a.size,
"width": a.width, # "width": a.width,
"height": a.height, # "height": a.height,
"content_type": a.content_type, # "content_type": a.content_type,
} # }
for a in message.attachments # for a in message.attachments
] # ]
} # }
if message.author.discriminator != "0": # if message.author.discriminator != "0":
payload["author"] += '#%s' % message.author.discriminator # payload["author"] += '#%s' % message.author.discriminator
try: # try:
self.bot.bridge_queue.put_nowait(payload) # self.bot.bridge_queue.put_nowait(payload)
except asyncio.QueueFull: # except asyncio.QueueFull:
_m = await message.reply( # _m = await message.reply(
"There's over 50 messages waiting to be bridged, slow the fuck down!", # "There's over 50 messages waiting to be bridged, slow the fuck down!",
) # )
print("Queue overload!") # print("Queue overload!")
await self.bot.bridge_queue.put(payload) # await self.bot.bridge_queue.put(payload)
await _m.delete(delay=0.01) # await _m.delete(delay=0.01)
print("Added %s to queue" % payload) # print("Added %s to queue" % payload)
if message.channel.name == "pinboard": if message.channel.name == "pinboard":
if message.type == discord.MessageType.pins_add: if message.type == discord.MessageType.pins_add: