matrix-org / matrix-appservice-discord

A bridge between Matrix and Discord.
Apache License 2.0
794 stars 149 forks source link

Channel not found #684

Open Hiajen opened 3 years ago

Hiajen commented 3 years ago

Summary

Setup Bridge and configurated it. Setup DiscordBot. But I am not able to actually bridge a channel. Always getting a "channel not found" Exception. Both matrix and and discord Bots appear online.

Tried multiple guilds/channels.

Dont know if I am doing something wrong, someone may help?

Expected Behaviour

When entering the command "!discord bridge guildXY channelXY" the bot should start bridging given channel in guild to current Matrix room.

Current Behaviour

"!discord bridge guildXY channelXY"

On matrix side getting following output

There was a problem bridging that channel - has the guild owner approved the bridge?

on the discord side nothing happens (i am Guild owner, bot has admin permission).

join channel "#_discord_guildXY_channelXY:foo.ba"

ending in endless loading loop.

Steps to Reproduce

(more or less)

  1. git clone
  2. nvm use --lts
  3. npm install
  4. cp config
  5. edit config (postgres setup)
  6. node build/src/discordas.js -r -u "http://localhost:9005" -c config.yaml
  7. cp registration file
  8. restart synapse
  9. add DiscordBot to Guild
  10. npm start

Logs / Screenshots

"!discord bridge guildXY channelXY"

Mar-6 13:59:38.337 [MatrixCommandHandler] error: Error bridging !fooBAA:matrix.hiajen.de to GuildXY/ChannelXY
Mar-6 13:59:38.338 [MatrixCommandHandler] error: Error: Channel "FOObaa" not found
    at DiscordBot.<anonymous> (/home/bots/Discord-Matrix-Bridge/matrix-appservice-discord/src/bot.ts:390:19)
    at Generator.next (<anonymous>)
    at fulfilled (/home/bots/Discord-Matrix-Bridge/matrix-appservice-discord/build/src/bot.js:20:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

join channel "#_discord_guildXY_channelXY:foo.ba"

Mar-6 14:07:24.992 [MatrixRoomHandler] error: Couldn't find discord room '_discord_guildXY_channelXY'. Error: Channel "FOObaa" not found
    at DiscordBot.<anonymous> (/home/bots/Discord-Matrix-Bridge/matrix-appservice-discord/src/bot.ts:390:19)
    at Generator.next (<anonymous>)
    at fulfilled (/home/bots/Discord-Matrix-Bridge/matrix-appservice-discord/build/src/bot.js:20:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
Mar-6 14:07:24.993 [DiscordAS] error: Exception thrown while handling "query.room" event TypeError: Cannot read property 'then' of undefined
    at Appservice.<anonymous> (/home/bots/Discord-Matrix-Bridge/matrix-appservice-discord/node_modules/matrix-bot-sdk/lib/appservice/Appservice.js:459:28)
    at Generator.next (<anonymous>)
    at /home/bots/Discord-Matrix-Bridge/matrix-appservice-discord/node_modules/matrix-bot-sdk/lib/appservice/Appservice.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/bots/Discord-Matrix-Bridge/matrix-appservice-discord/node_modules/matrix-bot-sdk/lib/appservice/Appservice.js:4:12)
    at /home/bots/Discord-Matrix-Bridge/matrix-appservice-discord/node_modules/matrix-bot-sdk/lib/appservice/Appservice.js:458:60
    at /home/bots/Discord-Matrix-Bridge/matrix-appservice-discord/src/discordas.ts:183:19
    at Generator.next (<anonymous>)
    at fulfilled (/home/bots/Discord-Matrix-Bridge/matrix-appservice-discord/build/src/discordas.js:5:58)
    at runMicrotasks (<anonymous>)

PS.: first issue, hope I did well

CorpulentBrony commented 3 years ago

I can confirm I appear to be experiencing the same issue, using either release 1.0.0 or master branch. I've confirmed the channel ID does exist in the given guild, and provided a screenshot and my logs proving this. Details are in issue in #694.

lutoma commented 2 years ago

Did any of you ever get the bot to work? I'm getting the exact same error.

Hiajen commented 2 years ago

no @lutoma i gave up, and did not try again.

doublebyte1 commented 2 years ago

I experienced the same issue

doublebyte1 commented 2 years ago

Presence: unavailable rageshake.ts:52:11 Presence: online rageshake.ts:52:11 sendEvent of type m.room.message in !rxtoeWPCfdubWwoJVL:matrix.org with txnId m1637277790919.3 rageshake.ts:52:11 Event sent to !rxtoeWPCfdubWwoJVL:matrix.org with event id $DKtJBehHeMA5wIcMyTcJQOQVbDj1gTJuURdvcmLceTM rageshake.ts:52:11 setting pendingEvent status to sent in !rxtoeWPCfdubWwoJVL:matrix.org event ID ~!rxtoeWPCfdubWwoJVL:matrix.org:m1637277790919.3 -> $DKtJBehHeMA5wIcMyTcJQOQVbDj1gTJuURdvcmLceTM rageshake.ts:52:11 Got remote echo for event $DKtJBehHeMA5wIcMyTcJQOQVbDj1gTJuURdvcmLceTM -> $DKtJBehHeMA5wIcMyTcJQOQVbDj1gTJuURdvcmLceTM old status sent rageshake.ts:52:11

CorpulentBrony commented 2 years ago

I gave up on getting it to work.

On Tue, Nov 16, 2021, 12:09 PM Lukas Martini @.***> wrote:

Did any of you ever get the bot to work? I'm getting the exact same error.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Half-Shot/matrix-appservice-discord/issues/684#issuecomment-970481291, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADDF2K4JLFMMD7VXOWO5PITUMKF23ANCNFSM4YWXFVPA .

--

Sent from TwiSpark.com

cutec-chris commented 2 years ago

Same here. On my Server it works like charm on an Server from our Community not.