mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 01:00:12 +00:00
Check for an existing webhook made by the bot first.
Otherwise, it'd create a new one and in case of failures or database corruptions, you'd hit the webhook limit quickly. This was a feature pre-rewrite but got lost in translation.
This commit is contained in:
parent
10746ae807
commit
4337430823
2 changed files with 18 additions and 6 deletions
|
|
@ -79,7 +79,7 @@ def run():
|
|||
return
|
||||
|
||||
# Second pass: do proxy matching
|
||||
await proxy.try_proxy_message(conn, message, logger)
|
||||
await proxy.try_proxy_message(conn, message, logger, client.user)
|
||||
|
||||
@client.event
|
||||
async def on_raw_message_delete(payload: discord.RawMessageDeleteEvent):
|
||||
|
|
@ -127,6 +127,9 @@ def run():
|
|||
traceback_str = "```python\n...{}```".format(traceback.format_exc()[- (2000 - len("```python\n...```")):])
|
||||
await log_channel.send(content=traceback_str, embed=embed)
|
||||
|
||||
# Print it to stderr anyway, though
|
||||
logging.getLogger("pluralkit").exception("Exception while handling event {}".format(event_name))
|
||||
|
||||
bot_token = os.environ["TOKEN"]
|
||||
if not bot_token:
|
||||
print("No token specified. Please pass a valid Discord bot token in the TOKEN environment variable.",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue