From c833a3fb220aad9582cd4bc2b8815bfb9db97f5d Mon Sep 17 00:00:00 2001 From: Blake Belladonna Date: Fri, 18 Aug 2017 01:06:15 +0100 Subject: [PATCH 1/7] Add Selfhosting for windows page --- public/markdown/selfhosting windows.md | 112 +++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 public/markdown/selfhosting windows.md diff --git a/public/markdown/selfhosting windows.md b/public/markdown/selfhosting windows.md new file mode 100644 index 0000000..f3e44f8 --- /dev/null +++ b/public/markdown/selfhosting windows.md @@ -0,0 +1,112 @@ +# How to selfhost FredBoat +This is a tutorial for users who would like to host their own bot running Fredboat. Please bear in mind that this is not a requirement for using the FredBoat service as I host a public bot that is simple to use. + +#### This tutorial is for advanced users. If you can't figure out how to run this, please use the public FredBoat♪♪ + +## Intallation + +### Requirements + +1. [Java 8 JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) + +2. [Apache Maven](https://maven.apache.org/install.html) + +3. [Git](https://www.atlassian.com/git/tutorials/install-git#windows) + +4. [JDK and Maven added to your PATH](https://www.tutorialspoint.com/maven/maven_environment_setup.htm) + +5. [A registered Discord application](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token) + +6. Windows (See Selfhosting(Linux) for the linux tutorial) + +### Instructions +Open Command Prompt and go to the directory where you want to have FredBoat download to(e.g `C:\Users\Fred\Desktop`) + +```sh +cd C:\Users\Fred\Desktop +``` + +Clone the `master` branch of FredBoat recursively: + +```sh +git clone --recursive https://github.com/Frederikam/FredBoat.git +``` + +Now compile the bot: + +```sh +cd FredBoat +mvn package shade:shade +``` + +To run the bot you should set up a directory that looks like this: + +``` +├──FredBoat-1.0.jar +├──credentials.yaml +└──config.yaml +``` + +The compiled bot can be found in `FredBoat/FredBoat/target`. A sample `config.yaml` and an example `credentials.yaml` can be found in https://github.com/Frederikam/FredBoat/tree/master/FredBoat + +You can ensure the directory looks like this by opening Command Prompt and doing: + +```sh +cd Path-to-your-folder +dir +``` + +In order to run the bot, you must first populate your bot with API credentials for Discord in the `credentials.yaml` file. + +Music bot only: Fill in the Discord bot token for patron and at least one Youtube API key. Set patron to true in the `config.yaml` file and development to false. Fill in the Spotify tokens to use Spotify. + +Full bot: Fill in the Discord bot token for beta and every other setting too. Set development to true in the `config.yaml` file and patron to false. + +Example credentials.yaml file: + +```yaml +--- + +### *** WARNING *** +### ALMOST EVERYTHING REQUESTED IN THIS FILE IS CONFIDENTIAL CREDENTIALS +### IF YOU POST THIS FILE ONLINE (such as on GitHub) YOUR BOT COULD BE COMPROMISED + +# For the ;;mal command +# Create an account on https://myanimelist.net/ and enter its login below +malUser: +malPassword: + +token: + # Add your discord bot token below to the beta and patron slots, between the quotation marks + # Find the token of your bot on https://discordapp.com/developers/applications/me + + beta: "YourTokenHere" + patron: "YourTokenHere" + production: + music: + +# Used by the ;;split and ;;np commands. Must be hooked up to the Youtube Data API. +# Add your google API key in the brackets below between the quotation marks +# How to get the key: https://developers.google.com/youtube/registering_an_application + +googleServerKeys: ["YourYoutubeAPIKey"] + + +# From https://cleverbot.io/ +cbUser: +cbKey: + + +# Used to access imgur galleries for some RandomImageCommands +# Acquired from here: https://api.imgur.com/oauth2/addclient +# Choose an option that does not require an Authorization callback URL +imgurClientId: + + +# Used to retrieve Spotify playlists +# Get them from here: https://developer.spotify.com/my-applications +spotifyId: +spotifySecret: +``` + +Once you are done configuring, run the bot with `java -jar -Xmx128m FredBoat-1.0.jar`. From b13f70026acd949f0eff8cd9b8ef2ee4ccbea903 Mon Sep 17 00:00:00 2001 From: Blake Belladonna Date: Fri, 18 Aug 2017 01:11:10 +0100 Subject: [PATCH 2/7] Update selfhosting windows.md --- public/markdown/selfhosting windows.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/public/markdown/selfhosting windows.md b/public/markdown/selfhosting windows.md index f3e44f8..42cc611 100644 --- a/public/markdown/selfhosting windows.md +++ b/public/markdown/selfhosting windows.md @@ -20,13 +20,14 @@ This is a tutorial for users who would like to host their own bot running Fredbo 6. Windows (See Selfhosting(Linux) for the linux tutorial) ### Instructions -Open Command Prompt and go to the directory where you want to have FredBoat download to(e.g `C:\Users\Fred\Desktop`) +Open Command Prompt and go to the directory where you want to download the bot +For example if your Windows Account name was `Fred`; you would do: ```sh cd C:\Users\Fred\Desktop ``` -Clone the `master` branch of FredBoat recursively: +Now clone the `master` branch of FredBoat recursively: ```sh git clone --recursive https://github.com/Frederikam/FredBoat.git @@ -56,6 +57,13 @@ cd Path-to-your-folder dir ``` +So assuming you started off using `C:\Users\Fred\Desktop`; you would do the following: + +```sh +cd C:\Users\Fred\Desktop\FredBoat\FredBoat\target +dir +``` + In order to run the bot, you must first populate your bot with API credentials for Discord in the `credentials.yaml` file. Music bot only: Fill in the Discord bot token for patron and at least one Youtube API key. Set patron to true in the `config.yaml` file and development to false. Fill in the Spotify tokens to use Spotify. From cdcbc7c90f10c2fd5cda2441434a9cedb17792eb Mon Sep 17 00:00:00 2001 From: Blake Belladonna Date: Fri, 18 Aug 2017 01:11:24 +0100 Subject: [PATCH 3/7] Update selfhosting windows.md --- public/markdown/selfhosting windows.md | 1 + 1 file changed, 1 insertion(+) diff --git a/public/markdown/selfhosting windows.md b/public/markdown/selfhosting windows.md index 42cc611..b9b28e7 100644 --- a/public/markdown/selfhosting windows.md +++ b/public/markdown/selfhosting windows.md @@ -21,6 +21,7 @@ This is a tutorial for users who would like to host their own bot running Fredbo ### Instructions Open Command Prompt and go to the directory where you want to download the bot + For example if your Windows Account name was `Fred`; you would do: ```sh From b8217f10282a6baf79124bbd977574edb504a083 Mon Sep 17 00:00:00 2001 From: Blake Belladonna Date: Fri, 18 Aug 2017 01:21:38 +0100 Subject: [PATCH 4/7] Update Filenaming --- public/markdown/{selfhosting.md => selfhosting_linux.md} | 0 .../markdown/{selfhosting windows.md => selfhosting_windows.md} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename public/markdown/{selfhosting.md => selfhosting_linux.md} (100%) rename public/markdown/{selfhosting windows.md => selfhosting_windows.md} (100%) diff --git a/public/markdown/selfhosting.md b/public/markdown/selfhosting_linux.md similarity index 100% rename from public/markdown/selfhosting.md rename to public/markdown/selfhosting_linux.md diff --git a/public/markdown/selfhosting windows.md b/public/markdown/selfhosting_windows.md similarity index 100% rename from public/markdown/selfhosting windows.md rename to public/markdown/selfhosting_windows.md From 133a26e818169f607c315d89ee8c87798b4583b3 Mon Sep 17 00:00:00 2001 From: Blake Belladonna Date: Fri, 18 Aug 2017 01:28:29 +0100 Subject: [PATCH 5/7] Update old docs.fredboat.com links to fredboat.com/docs --- public/markdown/faq.md | 2 +- public/markdown/index.md | 4 ++-- public/markdown/permissions.md | 2 +- public/markdown/selfhosting_linux.md | 4 ++-- public/markdown/selfhosting_windows.md | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/markdown/faq.md b/public/markdown/faq.md index c9daa79..3fb6099 100644 --- a/public/markdown/faq.md +++ b/public/markdown/faq.md @@ -16,7 +16,7 @@ The bot will only listen to music commands invoked in channels it can actually * If you want to restrict the bot to a specific role, you can always just restrict the bot to a channel only accessible by a specific set of roles. ## How do I selfhost the bot? -FredBoat was not originally written to be easily set up for selfhosting, but due to popular demand [I have written a tutorial.](http://docs.fredboat.com/selfhosting) +FredBoat was not originally written to be easily set up for selfhosting, but due to popular demand [I have written a tutorial.](http://docs.fredboat.com/selfhosting_linux) ## The music bot is telling me it doesn't have permission to connect/play music. How do I give it permission? You are trying to play music in a voice channel, but your __Discord server permissions__ prevents it from connecting or speaking. You would need to change the permissions of the channel to allow the bot to connect and speak, as you would do with a user. For official help on this topic, see [Discord's support center](https://support.discordapp.com/hc/en-us/articles/206029707). diff --git a/public/markdown/index.md b/public/markdown/index.md index c904012..dbf25ae 100644 --- a/public/markdown/index.md +++ b/public/markdown/index.md @@ -71,12 +71,12 @@ Let us know if you want other sites supported. We invite everyone to join FredBoat hangout, which is a place to discuss suggestions and request for support. I'm very willing to take suggestions for the bot so don't hesitate to say what you have in mind! [Click here to join!](https://discord.gg/cgPFW4q) ## Support -Before you do anything, please [read our FAQ](https://docs.fredboat.com/faq). +Before you do anything, please [read our FAQ](https://fredboat.com/docs/faq). You can join either our [Discord server](https://discord.gg/cgPFW4q) or tweet us at [@DiscordFredBoat](https://twitter.com/DiscordFredBoat). ## Legal -By using any of my hosted (but not selfhosted) bots you are subject to our (very minimal!) [terms of service](http://docs.fredboat.com/terms). +By using any of my hosted (but not selfhosted) bots you are subject to our (very minimal!) [terms of service](https://fredboat.com/docs/terms). Effective as of 25-apr-2017. diff --git a/public/markdown/permissions.md b/public/markdown/permissions.md index d9861ec..135a4c0 100644 --- a/public/markdown/permissions.md +++ b/public/markdown/permissions.md @@ -4,7 +4,7 @@ FredBoat uses 4 different ranks each with different permissions. * 3: Admin -*Can change [FredBoat configuration](https://docs.fredboat.com/configuration) and edit permissions* +*Can change [FredBoat configuration](https://fredboat.com/docs/configuration) and edit permissions* * 2: DJ diff --git a/public/markdown/selfhosting_linux.md b/public/markdown/selfhosting_linux.md index e9d6d7c..337f77f 100644 --- a/public/markdown/selfhosting_linux.md +++ b/public/markdown/selfhosting_linux.md @@ -13,7 +13,7 @@ This is a tutorial for users who would like to host their own bot running Fredbo 3. [A registered Discord application](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token) -4. Linux \(Windows works too, but this tutorial is targetted at Linux\) +4. Linux (For Windows; see [Selfhosting(Windows)](http://fredboat.com/docs/selfhosting_windows)) ### Instructions Clone the `master` branch of FredBoat recursively: @@ -95,4 +95,4 @@ spotifySecret: Once you are done configuring, run the bot with `java -jar -Xmx128m FredBoat-1.0.jar`. -[Follow this link](http://docs.fredboat.com/systemdservice) to find a tutorial on running FredBoat as a `systemd` service. +[Follow this link](https://fredboat.com/docs/systemdservice) to find a tutorial on running FredBoat as a `systemd` service. diff --git a/public/markdown/selfhosting_windows.md b/public/markdown/selfhosting_windows.md index b9b28e7..f5bcb34 100644 --- a/public/markdown/selfhosting_windows.md +++ b/public/markdown/selfhosting_windows.md @@ -17,7 +17,7 @@ This is a tutorial for users who would like to host their own bot running Fredbo 5. [A registered Discord application](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token) -6. Windows (See Selfhosting(Linux) for the linux tutorial) +6. Windows (See [Selfhosting(Linux)](https://fredboat.com/docs/selfhosting_linux) for the linux tutorial) ### Instructions Open Command Prompt and go to the directory where you want to download the bot From e7e2bf874395abf3cb5509d21423961aeea7b531 Mon Sep 17 00:00:00 2001 From: Blake Belladonna Date: Fri, 18 Aug 2017 01:38:40 +0100 Subject: [PATCH 6/7] Combine Linux and Windows selfhosting pages --- ...{selfhosting_windows.md => selfhosting.md} | 57 ++++++++--- public/markdown/selfhosting_linux.md | 98 ------------------- 2 files changed, 41 insertions(+), 114 deletions(-) rename public/markdown/{selfhosting_windows.md => selfhosting.md} (78%) delete mode 100644 public/markdown/selfhosting_linux.md diff --git a/public/markdown/selfhosting_windows.md b/public/markdown/selfhosting.md similarity index 78% rename from public/markdown/selfhosting_windows.md rename to public/markdown/selfhosting.md index f5bcb34..8a0cd91 100644 --- a/public/markdown/selfhosting_windows.md +++ b/public/markdown/selfhosting.md @@ -3,7 +3,41 @@ This is a tutorial for users who would like to host their own bot running Fredbo #### This tutorial is for advanced users. If you can't figure out how to run this, please use the public FredBoat♪♪ -## Intallation +## Linux + +### Requirements + +1. [Java 8 JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) + +2. git and maven in your PATH + +3. [A registered Discord application](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token) + +4. Linux (For Windows; see [Selfhosting(Windows)](http://fredboat.com/docs/selfhosting#Windows) + +### Instructions +Clone the `master` branch of FredBoat recursively: + +```sh +git clone --recursive https://github.com/Frederikam/FredBoat.git +``` + +Now compile the bot: + +```sh +cd FredBoat +mvn package shade:shade +``` + +To run the bot you should set up a directory that looks like this: + +``` +├──FredBoat-1.0.jar +├──credentials.yaml +└──config.yaml +``` + +## Windows ### Requirements @@ -17,7 +51,7 @@ This is a tutorial for users who would like to host their own bot running Fredbo 5. [A registered Discord application](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token) -6. Windows (See [Selfhosting(Linux)](https://fredboat.com/docs/selfhosting_linux) for the linux tutorial) +6. Windows (See [Selfhosting(Linux)](https://fredboat.com/docs/selfhosting#Linux) for the linux tutorial) ### Instructions Open Command Prompt and go to the directory where you want to download the bot @@ -49,21 +83,9 @@ To run the bot you should set up a directory that looks like this: └──config.yaml ``` -The compiled bot can be found in `FredBoat/FredBoat/target`. A sample `config.yaml` and an example `credentials.yaml` can be found in https://github.com/Frederikam/FredBoat/tree/master/FredBoat - -You can ensure the directory looks like this by opening Command Prompt and doing: - -```sh -cd Path-to-your-folder -dir -``` - -So assuming you started off using `C:\Users\Fred\Desktop`; you would do the following: +## Setting up config and credentials -```sh -cd C:\Users\Fred\Desktop\FredBoat\FredBoat\target -dir -``` +The compiled bot can be found in `FredBoat/FredBoat/target`. A sample `config.yaml` and an example `credentials.yaml` can be found in https://github.com/Frederikam/FredBoat/tree/master/FredBoat In order to run the bot, you must first populate your bot with API credentials for Discord in the `credentials.yaml` file. @@ -119,3 +141,6 @@ spotifySecret: ``` Once you are done configuring, run the bot with `java -jar -Xmx128m FredBoat-1.0.jar`. + + +[Follow this link](https://fredboat.com/docs/systemdservice) to find a tutorial on running FredBoat as a `systemd` service. diff --git a/public/markdown/selfhosting_linux.md b/public/markdown/selfhosting_linux.md deleted file mode 100644 index 337f77f..0000000 --- a/public/markdown/selfhosting_linux.md +++ /dev/null @@ -1,98 +0,0 @@ -# How to selfhost FredBoat -This is a tutorial for users who would like to host their own bot running Fredboat. Please bear in mind that this is not a requirement for using the FredBoat service as I host a public bot that is simple to use. - -#### This tutorial is for advanced users. If you can't figure out how to run this, please use the public FredBoat♪♪ - -## Intallation - -### Requirements - -1. [Java 8 JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) - -2. git and maven in your PATH - -3. [A registered Discord application](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token) - -4. Linux (For Windows; see [Selfhosting(Windows)](http://fredboat.com/docs/selfhosting_windows)) - -### Instructions -Clone the `master` branch of FredBoat recursively: - -```sh -git clone --recursive https://github.com/Frederikam/FredBoat.git -``` - -Now compile the bot: - -```sh -cd FredBoat -mvn package shade:shade -``` - -To run the bot you should set up a directory that looks like this: - -``` -├──FredBoat-1.0.jar -├──credentials.yaml -└──config.yaml -``` - -The compiled bot can be found in `FredBoat/FredBoat/target`. A sample `config.yaml` and an example `credentials.yaml` can be found in https://github.com/Frederikam/FredBoat/tree/master/FredBoat - -In order to run the bot, you must first populate your bot with API credentials for Discord in the `credentials.yaml` file. - -Music bot only: Fill in the Discord bot token for patron and at least one Youtube API key. Set patron to true in the `config.yaml` file and development to false. Fill in the Spotify tokens to use Spotify. - -Full bot: Fill in the Discord bot token for beta and every other setting too. Set development to true in the `config.yaml` file and patron to false. - -Example credentials.yaml file: - -```yaml ---- - -### *** WARNING *** -### ALMOST EVERYTHING REQUESTED IN THIS FILE IS CONFIDENTIAL CREDENTIALS -### IF YOU POST THIS FILE ONLINE (such as on GitHub) YOUR BOT COULD BE COMPROMISED - -# For the ;;mal command -# Create an account on https://myanimelist.net/ and enter its login below -malUser: -malPassword: - -token: - # Add your discord bot token below to the beta and patron slots, between the quotation marks - # Find the token of your bot on https://discordapp.com/developers/applications/me - - beta: "YourTokenHere" - patron: "YourTokenHere" - production: - music: - -# Used by the ;;split and ;;np commands. Must be hooked up to the Youtube Data API. -# Add your google API key in the brackets below between the quotation marks -# How to get the key: https://developers.google.com/youtube/registering_an_application - -googleServerKeys: ["YourYoutubeAPIKey"] - - -# From https://cleverbot.io/ -cbUser: -cbKey: - - -# Used to access imgur galleries for some RandomImageCommands -# Acquired from here: https://api.imgur.com/oauth2/addclient -# Choose an option that does not require an Authorization callback URL -imgurClientId: - - -# Used to retrieve Spotify playlists -# Get them from here: https://developer.spotify.com/my-applications -spotifyId: -spotifySecret: -``` - -Once you are done configuring, run the bot with `java -jar -Xmx128m FredBoat-1.0.jar`. - - -[Follow this link](https://fredboat.com/docs/systemdservice) to find a tutorial on running FredBoat as a `systemd` service. From 3f746972f6ee339272fd269cc45e8b62f0e5fc97 Mon Sep 17 00:00:00 2001 From: Blake Belladonna Date: Fri, 18 Aug 2017 01:40:08 +0100 Subject: [PATCH 7/7] Fix formatting --- public/markdown/selfhosting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/markdown/selfhosting.md b/public/markdown/selfhosting.md index 8a0cd91..9cc9d08 100644 --- a/public/markdown/selfhosting.md +++ b/public/markdown/selfhosting.md @@ -13,7 +13,7 @@ This is a tutorial for users who would like to host their own bot running Fredbo 3. [A registered Discord application](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token) -4. Linux (For Windows; see [Selfhosting(Windows)](http://fredboat.com/docs/selfhosting#Windows) +4. Linux (See [Selfhosting(Windows)](https://fredboat.com/docs/selfhosting#Windows) for the Windows tutorial) ### Instructions Clone the `master` branch of FredBoat recursively: @@ -51,7 +51,7 @@ To run the bot you should set up a directory that looks like this: 5. [A registered Discord application](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token) -6. Windows (See [Selfhosting(Linux)](https://fredboat.com/docs/selfhosting#Linux) for the linux tutorial) +6. Windows (See [Selfhosting(Linux)](https://fredboat.com/docs/selfhosting#Linux) for the Linux tutorial) ### Instructions Open Command Prompt and go to the directory where you want to download the bot