From cd27e065610bca8b6233a80b05b00bfad021af4a Mon Sep 17 00:00:00 2001 From: CallumJHays Date: Tue, 26 Feb 2019 22:53:39 +1000 Subject: [PATCH 1/3] Update with new UI + personal touch --- README.md | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index a536a76..a6dffa6 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,63 @@ # Code Network Discord Bot + This is the code that runs our official Code Network Discord bot. PRs welcome (see below). # License + Everything in this repo is released under the MIT license. By submitting any code you agree to license it under the MIT license too. # How to contribute -Our bot is written in python and we've made it easy to make additions. To make it easier -when developing your bot we highly recommend you make a test discord guild. This way you -can test your bot before you make a pull request. You can suggest new features in the -`#suggestions` or `#bot` channels in our discord. If you want to add a new feature, -you should read this entire page. After that you can make a pull request with any -changes. + +Our bot is written in python and we've made it easy to make additions. To make it easier +when developing your bot we highly recommend you make a test discord guild. This way you +can test your bot before you make a pull request. + +You can suggest new features in the `#suggestions` or `#bot` channels in our discord. +If you want to add a new feature, you should read this entire page. After that you +can make a pull request with any changes. ### Make a test discord server + First off, make a new discord server (also referred to as a Guild). You can do this -from within discord once you're logged in. Click the "+" button on the left side of +from within discord once you're logged in. Click the "+" button on the left side of the screen below all the current Guilds you've joined. ### Create your test bot + You'll have to make a new discord app, create a bot user then add it to your test guild. + [Click Here](https://discordapp.com/developers/applications/me) to make a new discord app. Name it something like "Joe's Test Guild" and fill in the mandatory fields. Once you've -made a new app, scroll down to the bot user section. Make a new bot user. Make note of the -token and paste it into the config.json file where it says "MY_BOT_TOKEN_HERE". +made a new app, click the "Bot" section button on the left to enter the bot menu. + +Make a new bot user. Make note of the token and paste it into the config.json file where it +says "MY_BOT_TOKEN_HERE". ### Add your bot to your test guild -From just above the bot user section, click the "OAuth2 URL Generator" button. Select the -"bot" scope and "Administrator" from the permissions section. Copy the URL then open it in + +Click the "OAuth2" button on the left to enter the menu. Click the "OAuth2 URL Generator" button. +Select the "bot" scope and "Administrator" from the permissions section. Copy the URL then open it in a new window. Select your test guild from the dropdown menu and hit "Authorize". The bot has now been added to your guild but is not currently running. ### Run your test bot + Because the bot opens a websocket to the discord API, it will run from almost anywhere. You don't need to setup any webhooks or public endpoints. From the root of this GitHub repo just run `python3 -m disco.cli --config config.json` to start the bot. ### Test your bot -From within your test guild you should be able to test your bot now. All bot commands + +From within your test guild you should be able to test your bot now. All bot commands start with "!". The command `!test` should work out of the box. Bear in mind some of the bot's functionality (like `!role give blah`) is dependant on the guild configuration and won't work unless your test guild is setup the same as the official Code Network one. Feel free to post in the `#bot` channel on the official guild if you need any help. ### Adding new functionality and testing your bot + It's best to only add functionality that is actually useful. Pull requests that don't add -anything useful or that are buggy probably won't be accepted. Make sure you thoroughly -test your bot first. Feel free to invite people to your test guild if you need help -testing. \ No newline at end of file +anything useful or that are buggy probably won't be accepted. Make sure you thoroughly +test your bot first. Feel free to invite people to your test guild if you need help +testing. From a0233404dfad5b0716e02f88a4cacf0a0ba1c449 Mon Sep 17 00:00:00 2001 From: CallumJHays Date: Tue, 26 Feb 2019 23:17:28 +1000 Subject: [PATCH 2/3] revised fix --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a6dffa6..e07abe1 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,8 @@ says "MY_BOT_TOKEN_HERE". ### Add your bot to your test guild -Click the "OAuth2" button on the left to enter the menu. Click the "OAuth2 URL Generator" button. -Select the "bot" scope and "Administrator" from the permissions section. Copy the URL then open it in +Click the "OAuth2" button on the left to enter the invite url menu. +Select the "bot" scope and "Administrator" from the bot permissions section. Copy the URL then open it in a new window. Select your test guild from the dropdown menu and hit "Authorize". The bot has now been added to your guild but is not currently running. From fff3d09fa84474e899456c278db121d6ab50c660 Mon Sep 17 00:00:00 2001 From: Callum Jacob Hays Date: Tue, 26 Feb 2019 23:28:48 +1000 Subject: [PATCH 3/3] easier to follow imo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e07abe1..c73aa0a 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ says "MY_BOT_TOKEN_HERE". ### Add your bot to your test guild -Click the "OAuth2" button on the left to enter the invite url menu. +Click the "OAuth2" button on the left to enter the invite url menu. Scroll down to the "scopes" section. Select the "bot" scope and "Administrator" from the bot permissions section. Copy the URL then open it in a new window. Select your test guild from the dropdown menu and hit "Authorize". The bot has now been added to your guild but is not currently running.