k8thekat / GatekeeperV2

Update to Gatekeeper
GNU General Public License v3.0
27 stars 11 forks source link

Bot not creating webhook #11

Closed Electrofried closed 2 years ago

Electrofried commented 2 years ago

Just testing with the latest version. Not sure why but even with all the required permissions the bot just does not seem to create a webhook and thus fails to forward chat to discord from minecraft. I have tried reinstalling Gatekeeper, kicking the bot, removing existing integrations and re-adding it, giving the bot every permission under the sun short of admin for testing. nothing seems to work. Is there some method or command to manually get the bot to set up the webhook again for chat or am I missing something very obvious here? Relevant log section below.

Thanks!

Found a Chat message
08/04/2022 11:28:30 AM [MainThread] [INFO] sending a message with default information
[2022-08-04 11:28:30] [ERROR ] discord.ext.tasks: Unhandled exception in internal background task 'amp_server_console_chat_messages_send'.
08/04/2022 11:28:30 AM [MainThread] [ERROR] Unhandled exception in internal background task 'amp_server_console_chat_messages_send'.
Traceback (most recent call last):
File "/home/amp/.local/lib/python3.10/site-packages/discord/ext/tasks/__init__.py", line 239, in _loop
await self.coro(*args, **kwargs)
File "/home/amp/.ampdata/instances/HiveMasterV2/gatekeeperv2/GatekeeperV2-main/cogs/AMP_cog.py", line 258, in amp_server_console_chat_messages_send
Traceback (most recent call last):
await webhook.send(message['Contents'], username= message['Source'])
File "/home/amp/.local/lib/python3.10/site-packages/discord/webhook/async_.py", line 1674, in send
File "/home/amp/.local/lib/python3.10/site-packages/discord/ext/tasks/__init__.py", line 239, in _loop
raise ValueError('This webhook does not have a token associated with it')
await self.coro(*args, **kwargs)
ValueError: This webhook does not have a token associated with it
File "/home/amp/.ampdata/instances/HiveMasterV2/gatekeeperv2/GatekeeperV2-main/cogs/AMP_cog.py", line 258, in amp_server_console_chat_messages_send
await webhook.send(message['Contents'], username= message['Source'])
File "/home/amp/.local/lib/python3.10/site-packages/discord/webhook/async_.py", line 1674, in send
raise ValueError('This webhook does not have a token associated with it')
ValueError: This webhook does not have a token associated with it 
k8thekat commented 2 years ago

Spoke to you earlier about this issue, resolved to an issue with webhook interaction and multiple webhooks on one channel.

Will look into other means of managing webhooks.