Changes between Initial Version and Version 1 of en/NLPMatrixDiscord


Ignore:
Timestamp:
Jun 27, 2025, 6:11:20 PM (6 days ago)
Author:
Ales Horak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • en/NLPMatrixDiscord

    v1 v1  
     1= Redirect Discord messages to NLP Matrix
     2
     3Redirecting selected rooms or servers from Discord to a NLP Matrix space is easy.
     4You only need to have a user account on both the Discord and NLP Matrix servers and you are ready to go.
     5
     6
     7[[PageOutline(2,The Discord -> Matrix setup consists of the following steps:,inline)]]
     8
     9== Find the Discord tokens and IDs
     10
     11Connect to the Discord app at https://discord.com/channels/@me
     12and find out the user token and the room and Discord server (guild) IDs.
     13
     14=== Discord user token
     15
     16Since the Matrix discordbot must operate on Discord on your behalf, you need to provide it with the corresponding `Authorization` token. The steps to find the token are as follows.
     17
     181. Press `<F12>` to open the ''Browser developer tools''. Go to the
     19   ''Network'' tab and filter the URL list for `api`. Reload the web page.
     201. Choose one of the URLs in the list with type `xml` or `xhr`. Display the ''Request headers''.
     211. Find `Authorization` in the header list - its value, is the **user token**. It should be something like `HEWkw2HE329cdsIOAAKSLFoosd.cspdfpoutwBJDW304DAQWEu0sdyvbsasDV02dfsggd3Ie`.
     22
     23=== Discord server/guild and room IDs
     24
     25Navigate to the selected Discord room within your https://discord.com/channels/@me app. Look at the URL of the room.
     26It should look like
     27{{{
     28https://discord.com/channels/3254238502750491529/1650295748356024125
     29}}}
     30The two numbers, `3254238502750491529` and `1650295748356024125` are the
     31**server ID** (also called guild ID) and **channel ID**.
     32
     33== Create a NLP Matrix discordbot room
     34
     35Login to NLP Matrix and create a new room named e.g. `Discord bridge bot`.
     36Invite user `@discordbot:nlp.fi.muni.cz` to the room. You should see the message
     37{{{
     38Hello, I'm a Discord bridge bot.
     39This room has been registered as your bridge management/status room.
     40Use help for help or login to log in.
     41}}}
     42In this room, you will be commanding your Discord bridging bot. You may start with the `help` command.
     43
     44== Choose which Discord items should be mirrored
     45
     46First, you need to log the `discordbot` to Discord on your behalf. Recall the
     47''user token'' that you have found in the previous section and in the NLP Matrix
     48`Discord bridge bot` room enter the command:
     49{{{
     50login-token user HEWkw2HE329cdsIOAAKSLFoosd.cspdfpoutwBJDW304DAQWEu0sdyvbsasDV02dfsggd3Ie
     51}}}
     52where the `HEWk...Ie` is your `Authorization` user token.
     53
     54The discord bot should reply with
     55{{{
     56Connecting to Discord as user ID 4029354238562374375
     57Successfully logged in as @your.discord.user.name
     58}}}
     59
     60When logged in, you may connect as many Discord servers as you wish.
     61You don't even need to look for the server/guild ID at Discord.
     62Just ask discordbot to
     63{{{
     64guilds status
     65}}}
     66and it will answer with your list of Discord servers such as
     67{{{
     68
     69}}}
     70The easiest way is just to find the  and instruct the
     71discordbot to
     72{{{
     73List of guilds:
     74
     75    FI MUNI (252345435334213123) - never bridge messages
     76    DigiLing (5562352412313131231) - never bridge messages
     77    ...
     78}}}
     79Now instruct discordbot to establish the bridge
     80{{{
     81guilds bridge 252345435334213123 --entire
     82}}}
     83shoud lead to
     84{{{
     85Successfully bridged guild
     86}}}
     87and discordbot creating a number of new invites for you to NLP Matrix space named `Discord` and to new NLP Matrix room for each Discord room in the bridged Discord server.
     88
     89[[br]]
     90
     91That's it! Now you can manage Discord and Matrix room in one place!