Skip to content

Commit 8367d32

Browse files
author
medeor413
committed
Add instructions for setting up Discord bot
1 parent 42054e1 commit 8367d32

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

DISCORD_BOT_SETUP.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# StarryPy Discord Bot
2+
3+
StarryPy includes a plugin that allows you to connect a bot to a Discord
4+
server that will relay messages between the Starbound and Discord servers.
5+
If the IRC bot also included with StarryPy is enabled, the Discord and IRC
6+
plugins will also relay messages between each other.
7+
8+
## Using the Discord Bot
9+
The Discord bot plugin uses the [discord.py](https://github.com/Rapptz/discord.py)
10+
library, and will not work without it.
11+
12+
To use the Discord bot, you will need to create a Discord application. Go to
13+
[this page](https://discordapp.com/developers/applications/me) and click the
14+
"New Application" button.
15+
Give your bot a descriptive name; giving it an avatar or description is optional.
16+
17+
Once you have created your application, you must create a bot user by clicking the "Create a Bot User" option on
18+
the application's page.
19+
20+
To add the bot to your server, go to `https://discordapp.com/oauth2/authorize?&client_id=CLIENT_ID&scope=bot&permissions=0`
21+
(replacing `CLIENT_ID` with your application's client ID) and add the
22+
bot to your server.
23+
24+
Once the bot is added to your server, copy the token
25+
and client id from the application to the fields in config.json. Get the
26+
channel id for a given channel by enabling Developer Mode in
27+
Discord, right-clicking a channel, and clicking "Copy ID," then paste this
28+
ID into the "channel" field in config.json. Your bot should now be fully
29+
configured and ready to use.

OPTIONAL_REQUIREMENTS

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
tornado
2-
irc3
1+
irc3
2+
discord.py

plugins/discord_bot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def on_client_disconnect_request(self, data, connection):
147147

148148
def on_chat_sent(self, data, connection):
149149
"""
150-
Hook on message being broadcast on server. Display it in IRC.
150+
Hook on message being broadcast on server. Display it in Discord.
151151
152152
If 'sc' is True, colors are stripped from game text. e.g. -
153153

0 commit comments

Comments
 (0)