-
Notifications
You must be signed in to change notification settings - Fork 4
Configuration
The bot's configuration file, configuration.xml
, uses the XML format. This page will guide you through each section.
First, rename configuration-example.xml
to configuration.xml
:
To open configuration.xml
, right click the file then click Edit
:
This will open the configuration file in Notepad.
With your bot folder open in a terminal, type the following to rename configuration-example.xml
to configuration.xml
:
mv configuration-example.xml configuration.xml
To open configuration.xml
, use nano
:
nano configuration.xml
<?xml version="1.0"?>
<!--
This is XML, if you don't know XML, look it up.
It's really easy, if you can host a RoR-server, host this bot,
then I assume that you can read/write XML as well.
There're 2 sections in this file:
- The Discord configuration
- The RoR-server(s) configuration
Quite self-explanatory.
Minimal configuration:
<configuration>
<Discordclient>
<bot token="" />
</Discordclient>
<RoRclients>
<RoRclient>
<server host="yourHost" port=somePort />
<discord channel="" />
</RoRclient>
</RoRclients>
</configuration>
-->
<configuration>
<Discordclient>
<bot token="" />
</Discordclient>
<RoRclients>
<RoRclient id="myServer1" enabled="yes">
<server host="example.com" port="12000" password="" />
<user name="Services" token="515cf64ec28c445ca5786ec7122d7154" language="en_US" />
<!-- Copy and paste the channel ID here. To get the channel ID you must first enter
Developer Mode from User Settings -> Appearance -> Advanced -> and toggle on/off
for Developer Mode -->
<discord channel="" />
<announcements delay="600" enabled="yes"> <!-- delay in seconds -->
<announcement>Hi, I'm an announcement</announcement>
<announcement>And I'm the second announcement.</announcement>
<announcement>And I'm the last one. After me, you'll see number 1 again</announcement>
</announcements>
</RoRclient>
</RoRclients>
</configuration>
This is the default configuration file. It contains 2 sections:
- Discord server configuration
- RoR server(s) configuration
<Discordclient>
<bot token="" />
</Discordclient>
Defines Discord server bot token. You should have Discord bot's token when you created it (Creating a Bot Account).
<RoRclients>
<RoRclient id="myServer1" enabled="yes">
<server host="example.com" port="12000" password="" />
<user name="Services" token="515cf64ec28c445ca5786ec7122d7154" language="en_US" />
<!-- Copy and paste the channel ID here. To get the channel ID you must first enter
Developer Mode from User Settings -> Appearance -> Advanced -> and toggle on/off
for Developer Mode -->
<discord channel="channel ID" />
<announcements delay="600" enabled="yes"> <!-- delay in seconds -->
<announcement>Hi, I'm an announcement</announcement>
<announcement>And I'm the second announcement.</announcement>
<announcement>And I'm the last one. After me, you'll see number 1 again</announcement>
</announcements>
</RoRclient>
</RoRclients>
This section defines the RoR servers the bot will join.
IMPORTANT: Do NOT attempt to connect the bot to servers you do not own. Your bot will be banned.
You can connect to multiple servers by copying the <RoRclient
- </RoRclient>
syntax. Example:
<RoRclients>
<RoRclient id="myServer1" enabled="yes">
<server host="example.com" port="12000" password="" />
<user name="Services" token="515cf64ec28c445ca5786ec7122d7154" language="en_US" />
<!-- Copy and paste the channel ID here. To get the channel ID you must first enter
Developer Mode from User Settings -> Appearance -> Advanced -> and toggle on/off
for Developer Mode -->
<discord channel="channel ID 1" />
<announcements delay="600" enabled="yes"> <!-- delay in seconds -->
<announcement>Hi, I'm an announcement</announcement>
<announcement>And I'm the second announcement.</announcement>
<announcement>And I'm the last one. After me, you'll see number 1 again</announcement>
</announcements>
</RoRclient>
<RoRclient id="myServer2" enabled="yes">
<server host="example.com" port="12001" password="" />
<user name="Services" token="515cf64ec28c445ca5786ec7122d7154" language="en_US" />
<!-- Copy and paste the channel ID here. To get the channel ID you must first enter
Developer Mode from User Settings -> Appearance -> Advanced -> and toggle on/off
for Developer Mode -->
<discord channel="channel ID 2" />
<announcements delay="600" enabled="yes"> <!-- delay in seconds -->
<announcement>Hi, I'm an announcement</announcement>
<announcement>And I'm the second announcement.</announcement>
<announcement>And I'm the last one. After me, you'll see number 1 again</announcement>
</announcements>
</RoRclient>
</RoRclients>
<RoRclient id="myServer1" enabled="yes">
The 'internal' name of your server and if the server is enabled. Use underscores or hyphens instead of spaces.
<server host="example.com" port="12000" password="" />
Server connection info. Use the same hostname/port RoR connects with. If your server is private, make sure you set the password here.
<user name="services" token="515cf64ec28c445ca5786ec7122d7154" language="en_US" />
The username, token, and language the bot will use in RoR.
For an explanation on how to use the token, see Making the bot a server admin.
IMPORTANT: Do NOT use the default token to make your bot admin! This is the unhashed token, anyone could copy it into their RoR settings and become admin on your server!
<discord channel="channel ID" />
Discord channel to connect. To get the channel ID you must first enter Developer Mode from User Settings -> Advanced -> Developer Mode -> toggle On:
Then right click to the channel you want and press Copy ID:
<announcements delay="600" enabled="yes"> <!-- delay in seconds -->
<announcement>Hi, I'm an announcement</announcement>
<announcement>And I'm the second announcement.</announcement>
<announcement>And I'm the last one. After me, you'll see number 1 again</announcement>
</announcements>
Here you can set messages the bot will repeat after a specified time. Default is 10 minutes per message.
You've reached the end of the configuration file. Your bot should now be ready to use. Return to Installation page