Closed terencechain closed 5 years ago
We can launch these into the upcoming kubernetes cluster, but we need to share the API credentials and discuss the deployment internally.
Hi all, the instructions for the bots are as follows:
We have a bot that fetches github issues by quoting them as {{issue_num}} on our discord public channels. This is handled by the nodejs repo here: https://github.com/rauljordan/discord-github-issue-fetcher where setup instructions are located in its README.
It requires a discord bot token, which can be obtained by navigating to the discord developer's portal, creating a new application, and creating a new bot. As Jan 24, 2019, one can head to the OAuth2 section of the portal, check the "bot" option, and an OAuth2 URL will be generated which can then be copied and pasted into the URL bar. This will add the bot to the server. Then, head back to the developer portal and go to the bot section, where you can copy the bot's secret token (keep this safe). This is the token needed by the Github Issue Fetcher as specified in its README.
The next part is the Gitter <-> Discord bridge. We use the Matterbridge project with the following configuration:
#WARNING: as this file contains credentials, be sure to set correct file permissions
[gitter.prysmaticlabs]
#You can get your token by going to https://developer.gitter.im/docs/welcome and SIGN IN
Token="GITTERTOKEN"
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
[discord.mydiscord]
#You can get your token by following the instructions on
#https://github.com/42wim/matterbridge/wiki/Discord-bot-setup
#If you want roles/groups mentions to be shown with names instead of ID,
#you'll need to give your bot the "Manage Roles" permission.
Token="DISCORDTOKEN"
Server="Prysmatic Labs"
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
[[gateway]]
name="gateway1"
enable=true
[[gateway.inout]]
account="discord.mydiscord"
channel="gitter"
[[gateway.inout]]
account="gitter.prysmaticlabs"
channel="prysmaticlabs/prysm"
Save the above into a file called matterbridge.toml
locally. Then, do the same setup as above in the Github Issue Fetcher to create a new bot on discord and obtain its discord bot token. Now, head over to Gitter to obtain a developer token from their developer portal. These two values can be replaced in the TOML file above where it says DISCORDTOKEN and GITTERTOKEN.
Then, follow the instructions to launch matterbridge on your machine (Docker I found is the easiest) by using the configuration file specified above. Voila!
Closing :)
Issue fetchers bot and gitter bot are not working. Looks like we need to relaunch the instances somewhere. @rauljordan please provide the creds and document how to launch them