Difference between revisions of "External"

From Bebot Wiki 2
Jump to navigationJump to search
Line 39: Line 39:
 
!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 ...

Revision as of 11:00, 3 February 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.


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.