matrix-appservice-discord icon indicating copy to clipboard operation
matrix-appservice-discord copied to clipboard

Bot service does not respond to !discord messages, and "Couldn't find discord room" errors

Open tnunamak opened this issue 4 years ago • 4 comments

I am working on setting this bridge up with my synapse server. A quick summary of the state of things:

  • I'm running the bridge (and synapse) in docker.
  • My discord channel shows my bot user online.
  • I have added the bot user to my matrix channel. It shows as offline.
  • I have enableSelfServiceBridging: true in my config.
  • When sending !discord commands in my matrix channel, nothing happens.
  • When I send any message in my matrix channel, synapse and the bridge both log a 200 for the transaction.
2021-04-04 23:47:57,038 - synapse.http.client - 440 - INFO - as-sender-discord-bridge-74 - Received response to PUT http://matrix-discord:9005/transactions/296?access_token=<redacted>: 200
172.28.0.22 - - [05/Apr/2021:04:48:11 +0000] "PUT /transactions/297?access_token=70a... HTTP/1.1" 200 2 "-" "Synapse/1.30.1"
  • When I try to join a room manually with the guild and channel ID of my discord channel, I get the following errors.
Apr-4 23:45:10.134 [MatrixRoomHandler] info: Got request for # _discord_278..._278...
Apr-4 23:45:10.161 [MatrixRoomHandler] error: Couldn't find discord room '_discord_278..._278...'. Error: Channel "278..." not found
    at DiscordBot.<anonymous> (/src/bot.ts:390:19)
    at Generator.next (<anonymous>)
    at fulfilled (/build/src/bot.js:20:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
Apr-4 23:45:10.165 [DiscordAS] error: Exception thrown while handling "query.room" event TypeError: Cannot read property 'then' of undefined
    at Appservice.<anonymous> (/node_modules/matrix-bot-sdk/lib/appservice/Appservice.js:459:28)
    at Generator.next (<anonymous>)
    at /node_modules/matrix-bot-sdk/lib/appservice/Appservice.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/node_modules/matrix-bot-sdk/lib/appservice/Appservice.js:4:12)
    at /node_modules/matrix-bot-sdk/lib/appservice/Appservice.js:458:60
    at /src/discordas.ts:183:19
    at Generator.next (<anonymous>)
    at fulfilled (/build/src/discordas.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

Please let me know if there's any other info I can provide, or if there's something I should investigate.

tnunamak avatar Apr 05 '21 05:04 tnunamak

To double-check, what permissions does the bot have on the Discord side?

auscompgeek avatar Apr 05 '21 05:04 auscompgeek

I made the Discord bot an admin.

tnunamak avatar Apr 05 '21 14:04 tnunamak

I haven't changed anything that I can think of, but now the bot is responding to !discord commands. Unfortunately it still says the room(s) cannot be found.

I'm also getting a constant stream of 'status_msg must be a string' presence errors in the log.

tnunamak avatar Apr 07 '21 02:04 tnunamak

i have the same issue as this, with the same "redacted" 200 code PUT request whenever i say anything.. but i was able to discover that the !discord commands don't get replied to.. but they still work. you search for the chat with #_discord_SERVERID_CHATID and then hitting enter makes you make a new room to which you put "_discord_SERVERID_CHATID" in the room ID slot .. it says "room ID already in use" and then you search for it again and it exists and is joinable. i dont know why but this works wihtout fail, even if the bot doesn't forward anything form matrix.

Mrs-Feathers avatar Aug 06 '23 00:08 Mrs-Feathers