Difference between revisions of "External"

From Bebot Wiki 2
Jump to navigationJump to search
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
  
 
== 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.
Line 39: Line 38:
 
!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/
  
  

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[edit]

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[edit]

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[edit]

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.