Difference between revisions of "External"
(Created page with 'EXTERNAL RELAY MODULES ====================== Nowadays there are 2 main options for this in the gaming universe : - IRC which has historically been the most used media for linke…') |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | Nowadays there are 2 main options for this in the gaming universe : | |
− | |||
− | |||
- IRC which has historically been the most used media for linked chat | - IRC which has historically been the most used media for linked chat | ||
+ | |||
- Discord that is now a very commonly used multiplatform chat appli | - Discord that is now a very commonly used multiplatform chat appli | ||
+ | |||
We'll see below how to connect your raid/guild bot to these. | We'll see below how to connect your raid/guild bot to these. | ||
− | IRC | + | |
− | + | ||
+ | == IRC == | ||
You first decide which IRC server you want to use. Many are public & free. | You first decide which IRC server you want to use. Many are public & free. | ||
+ | |||
Create you #channel if it doesn't exist, you must be owner or at least moderator. | Create you #channel if it doesn't exist, you must be owner or at least moderator. | ||
+ | |||
You may use a dedicated bot to hold channel, kick intruders, set a pass/key, etc. | You may use a dedicated bot to hold channel, kick intruders, set a pass/key, etc. | ||
+ | |||
Commands are described @ https://gist.github.com/xero/2d6e4b061b4ecbeb9f99 | Commands are described @ https://gist.github.com/xero/2d6e4b061b4ecbeb9f99 | ||
+ | |||
Once your #channel is ready, it's time to link your Bebot by doing : | Once your #channel is ready, it's time to link your Bebot by doing : | ||
+ | |||
!settings irc | !settings irc | ||
+ | |||
+ | |||
You'll obtain a panel in which you can set everything up : | You'll obtain a panel in which you can set everything up : | ||
+ | |||
- main connection elements Server, Port (often 6667), #Channel & various options | - main connection elements Server, Port (often 6667), #Channel & various options | ||
+ | |||
- security elements like Key (if a pass was set) & channels options | - security elements like Key (if a pass was set) & channels options | ||
+ | |||
- visual elements like prefixes, references, size limits, etc ... | - visual elements like prefixes, references, size limits, etc ... | ||
+ | |||
After settings this all correctly, you can start IRC relay with : | After settings this all correctly, you can start IRC relay with : | ||
+ | |||
!irc connect | !irc connect | ||
+ | |||
The bot should also reconnect by itself after reboot. | The bot should also reconnect by itself after reboot. | ||
+ | |||
For more details & commands : | For more details & commands : | ||
+ | |||
!help irc | !help irc | ||
+ | |||
If your bot can't connect to IRC, verify all !settings ... | If your bot can't connect to IRC, verify all !settings ... | ||
+ | |||
Possibly you mistyped something like server, channel, port or pass/key. | Possibly you mistyped something like server, channel, port or pass/key. | ||
− | + | ||
− | ---- | + | == Twitch == |
+ | |||
+ | Chat of your Twitch account, shown beside your video stream, is IRC compatible. | ||
+ | |||
+ | So to connect Bebot to your Twitch chat, do exactly as said upper for IRC, plus : | ||
+ | |||
+ | - set account name (lowercase) as Nick (main account or another with chat access) | ||
+ | |||
+ | - use 6667 as Port with irc.chat.twitch.tv as Server | ||
+ | |||
+ | - set Channel as chat account #name (lowercase preceded by #) | ||
+ | |||
+ | - enter OAuthTok you obtain on https://twitchapps.com/tmi/ | ||
+ | |||
+ | |||
+ | == Discord == | ||
Create your server/channel(s) if they don't exist, you must be owner or at least admin. | Create your server/channel(s) if they don't exist, you must be owner or at least admin. | ||
+ | |||
You may set several channel(s), role(s), visual(s) & start inviting people at will. | You may set several channel(s), role(s), visual(s) & start inviting people at will. | ||
Right clic on server > Settings > Widget and activate it on the top right corner. | Right clic on server > Settings > Widget and activate it on the top right corner. | ||
+ | |||
Click on the channel you want to relay from/to & copy its Id (last digit in its URL). | Click on the channel you want to relay from/to & copy its Id (last digit in its URL). | ||
+ | |||
If you can't find Id, go into your settings "Appearance" tab & activate Dev mode "On". | If you can't find Id, go into your settings "Appearance" tab & activate Dev mode "On". | ||
+ | |||
Then right click the wanted channel to copy its Id all below its contextual menu. | Then right click the wanted channel to copy its Id all below its contextual menu. | ||
+ | |||
(The Server Id is the first digit in URL, or right click server & copy like done upper) | (The Server Id is the first digit in URL, or right click server & copy like done upper) | ||
+ | |||
Now go https://discord.com/developers/applications to create an access for your Bebot : | Now go https://discord.com/developers/applications to create an access for your Bebot : | ||
+ | |||
Click "New Application" & give it a name which can be different from ingame botname. | Click "New Application" & give it a name which can be different from ingame botname. | ||
Go into "Bot" tab, activate this option by clicking "Add Bot" & confirming. | Go into "Bot" tab, activate this option by clicking "Add Bot" & confirming. | ||
Line 53: | Line 93: | ||
Paste link in a web browser to visit it, select wanted server, confirm, captcha & win! | Paste link in a web browser to visit it, select wanted server, confirm, captcha & win! | ||
Now your bot should show as offline in your Discord (except at quick connection ping). | Now your bot should show as offline in your Discord (except at quick connection ping). | ||
+ | |||
Execute this section only if you run Bebot on a PHP version lower than 7.0 : | Execute this section only if you run Bebot on a PHP version lower than 7.0 : | ||
− | Any Discord bot would be limitated until it has connected Discord wsocket once. | + | |
− | There is a lib to automate that but it only works with PHP 7.0+ ... | + | Any Discord bot would be limitated until it has connected Discord wsocket once. |
− | So to emulate this 1-timer ping, you can use any compatible solution for few minutes. | + | There is a lib to automate that but it only works with PHP 7.0+ ... |
− | E.g. "Bot Designer For Discord" is a genius android appstored by Nilpointer Soft (J. Tomana). | + | So to emulate this 1-timer ping, you can use any compatible solution for few minutes. |
− | Launch, create bot, enter name/token, accept policies, start, add time, login, logoff, close. | + | E.g. "Bot Designer For Discord" is a genius android appstored by Nilpointer Soft (J. Tomana). |
− | This way your bot access will be unlocked & fully capable, even under PHP 5.x ! | + | Launch, create bot, enter name/token, accept policies, start, add time, login, logoff, close. |
+ | This way your bot access will be unlocked & fully capable, even under PHP 5.x ! | ||
+ | |||
Final step is to configure your Bebot by doing : | Final step is to configure your Bebot by doing : | ||
+ | |||
!settings discord | !settings discord | ||
+ | |||
+ | |||
You'll obtain a panel in which you can set everything up : | You'll obtain a panel in which you can set everything up : | ||
+ | |||
- main connection elements BotToken & ChannelId | - main connection elements BotToken & ChannelId | ||
+ | |||
- other elements like channels options | - other elements like channels options | ||
+ | |||
After settings this all correctly, you can start Discord relay with : | After settings this all correctly, you can start Discord relay with : | ||
+ | |||
!discord connect | !discord connect | ||
+ | |||
The bot should fastly ping & then keep on relaying by itself even after reboot. | The bot should fastly ping & then keep on relaying by itself even after reboot. | ||
+ | |||
For more details & commands : | For more details & commands : | ||
+ | |||
!help discord | !help discord | ||
If you bot doesn't ping/relay correctly, verify all !settings ... | If you bot doesn't ping/relay correctly, verify all !settings ... | ||
Also verify all Discord side : roles/permissions, Ids, widget, etc. | Also verify all Discord side : roles/permissions, Ids, widget, etc. |
Latest revision as of 13:53, 2 August 2021
Nowadays there are 2 main options for this in the gaming universe :
- IRC which has historically been the most used media for linked chat
- Discord that is now a very commonly used multiplatform chat appli
We'll see below how to connect your raid/guild bot to these.
IRC
You first decide which IRC server you want to use. Many are public & free.
Create you #channel if it doesn't exist, you must be owner or at least moderator.
You may use a dedicated bot to hold channel, kick intruders, set a pass/key, etc.
Commands are described @ https://gist.github.com/xero/2d6e4b061b4ecbeb9f99
Once your #channel is ready, it's time to link your Bebot by doing :
!settings irc
You'll obtain a panel in which you can set everything up :
- main connection elements Server, Port (often 6667), #Channel & various options
- security elements like Key (if a pass was set) & channels options
- visual elements like prefixes, references, size limits, etc ...
After settings this all correctly, you can start IRC relay with :
!irc connect
The bot should also reconnect by itself after reboot.
For more details & commands :
!help irc
If your bot can't connect to IRC, verify all !settings ...
Possibly you mistyped something like server, channel, port or pass/key.
Twitch
Chat of your Twitch account, shown beside your video stream, is IRC compatible.
So to connect Bebot to your Twitch chat, do exactly as said upper for IRC, plus :
- set account name (lowercase) as Nick (main account or another with chat access)
- use 6667 as Port with irc.chat.twitch.tv as Server
- set Channel as chat account #name (lowercase preceded by #)
- enter OAuthTok you obtain on https://twitchapps.com/tmi/
Discord
Create your server/channel(s) if they don't exist, you must be owner or at least admin.
You may set several channel(s), role(s), visual(s) & start inviting people at will.
Right clic on server > Settings > Widget and activate it on the top right corner.
Click on the channel you want to relay from/to & copy its Id (last digit in its URL).
If you can't find Id, go into your settings "Appearance" tab & activate Dev mode "On".
Then right click the wanted channel to copy its Id all below its contextual menu.
(The Server Id is the first digit in URL, or right click server & copy like done upper)
Now go https://discord.com/developers/applications to create an access for your Bebot :
Click "New Application" & give it a name which can be different from ingame botname. Go into "Bot" tab, activate this option by clicking "Add Bot" & confirming. Copy the Bot Token from this tab, it will be used later below. Then go into "OAuth2" tab, check "bot" option in the "Scopes" window. In "Permissions", check at least "View Channels" & "Send Messages" (aka 3072) Back upper in "Scopes", click "Copy" to obtain the bot validation link. Paste link in a web browser to visit it, select wanted server, confirm, captcha & win! Now your bot should show as offline in your Discord (except at quick connection ping).
Execute this section only if you run Bebot on a PHP version lower than 7.0 :
Any Discord bot would be limitated until it has connected Discord wsocket once. There is a lib to automate that but it only works with PHP 7.0+ ... So to emulate this 1-timer ping, you can use any compatible solution for few minutes. E.g. "Bot Designer For Discord" is a genius android appstored by Nilpointer Soft (J. Tomana). Launch, create bot, enter name/token, accept policies, start, add time, login, logoff, close. This way your bot access will be unlocked & fully capable, even under PHP 5.x !
Final step is to configure your Bebot by doing :
!settings discord
You'll obtain a panel in which you can set everything up :
- main connection elements BotToken & ChannelId
- other elements like channels options
After settings this all correctly, you can start Discord relay with :
!discord connect
The bot should fastly ping & then keep on relaying by itself even after reboot.
For more details & commands :
!help discord
If you bot doesn't ping/relay correctly, verify all !settings ... Also verify all Discord side : roles/permissions, Ids, widget, etc.