Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discord Bridge] Command For Room Admin Not Working #822

Closed
WardenTechServices opened this issue Jan 25, 2021 · 1 comment
Closed

[Discord Bridge] Command For Room Admin Not Working #822

WardenTechServices opened this issue Jan 25, 2021 · 1 comment

Comments

@WardenTechServices
Copy link

Hello,
I am having issues with the command:

docker exec -it matrix-appservice-discord /bin/sh -c 'cp /build/tools/adminme.js /tmp/adminme.js && cp /cfg/registration.yaml /tmp/discord-registration.yaml && cd /tmp && node /tmp/adminme.js -c /cfg/config.yaml -r "!ROOM_ID:SERVER" -u "@USER:SERVER" -p 100'

This is used to make a user an admin of a room created for discord bridging via matrix-appservice-discord. I get the error. The error I get is:

internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module './toolshelper'
Require stack:
- /tmp/adminme.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/tmp/adminme.js:33:23)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/tmp/adminme.js' ]
}

I am not to sure on how to debug it but I thought someone might have a clue or I am doing something incorrect.
Many Thanks

spantaleev added a commit that referenced this issue Jan 25, 2021
Related to:
- matrix-org/matrix-appservice-discord#666
- matrix-org/matrix-appservice-discord#667

Will fix:
- #795
- #822

.. but only after a new version of matrix-appservice-discord is released
and we upgrade to it.
spantaleev added a commit that referenced this issue Jan 25, 2021
@spantaleev
Copy link
Owner

Should be fixed now. Try this (as described in #795):

docker exec -it matrix-appservice-discord \
/bin/sh -c 'cp /cfg/registration.yaml /tmp/discord-registration.yaml && cd /tmp && node /build/tools/adminme.js -c /cfg/config.yaml -m "!ROOM_ID:SERVER" -u "@USER:SERVER" -p 100'

In the future, we'll have a less ugly command to do this, but we need to wait for the next matrix-appservice-discord release (see #825)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants