From 9e211361cec3dc93144630696241a8b23841511c Mon Sep 17 00:00:00 2001 From: AZMindroma <69211110+AZMindroma@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:30:19 +0100 Subject: [PATCH 1/5] Update README.md --- README.md | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index f808aeb..8d077e0 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,33 @@ # wordy -This is the new and improved word cloud discord bot ! +This is the new and improved word cloud Discord bot! -As opposed to the previous Python version, Wordy starts processing the messages as soon as it joins the server and it's much faster with it ! +As opposed to the previous Python version, Wordy starts processing the messages as soon as it joins a server and is much faster doing so! It also automatically continues to process new messages as they are sent. -*Related Blog article: https://teo-orthlieb.github.io/blog/user-word-cloud/* +*Related blog article: https://teo-orthlieb.github.io/blog/user-word-cloud/* ## How to run it -The discord registration step is the same for all bot that you run yourself. +The Discord Application creation step is usually the same for all bot that you self-host. -### Register Discord Application -- go to https://discordapp.com/developers/applications/ create your app -- add a User Bot to it and paste its Token in `token.txt` -- enable `SERVER MEMBERS INTENT` and `MESSAGE CONTENT INTENT` in the bot tab -- invite the bot with `https://discord.com/api/oauth2/authorize?client_id=CLIENT_ID&permissions=0&scope=bot%20applications.commands` replace `CLIENT_ID` with the Client ID of your app +### Create a Discord Application +- Go to https://discordapp.com/developers/applications/ and create your app +- Add a bot to it and copy its token. You will need it later! +- Enable `PRESENCE INTENT`, `SERVER MEMBERS INTENT` and `MESSAGE CONTENT INTENT` in the bot tab +- Invite the bot with `https://discord.com/oauth2/authorize?client_id=CLIENT_ID&permissions=101376&integration_type=0&scope=bot+applications.commands` and replace `CLIENT_ID` with the Client ID of your app + +**Note:** The OAuth2 link includes following permissions: View Channels, Send Messages, Read Message History (to load messages sent before the bot joined), Attach Files (to send the word cloud image) ### Run it - Clone the project wherever you want -- add the `token.txt` file at the root of the project -- Install the necessary tools to compile Rust with https://rustup.rs/ -- With a terminal positionned at the root of the project, run `cargo build --release` to build the project. -*Note: this will take a while because it's the first build you do, subsequent builds will be much faster* +- add the `token.txt` file at the root of the project (the root of the project is not inside the src folder, instead the folder with the Cargo files and the assets and src folder) and paste the token you copied before into the file (without anything else) +- Install the necessary tools to compile Rust programs with https://rustup.rs/ +- With a terminal positioned at the root of the project, run `cargo build --release` to build the project. +*Note: This will take a while because it's the first build you do, subsequent builds will be much faster.* - Run the project with `cargo run --release` -[demo incoming] +### Generate your word cloud +- The bot will load existing messages from the channels it is able to read from. +- Once the messages are loaded (it also works beforehand, which will however not give an extensive result), you can run the bot's slash command `/cloud` to display your word cloud! + +#### This is how a word cloud might look like: +![Demonstration word cloud](test.png) From 154847ab3bd96182a189bba3d029e8a7b8c5c031 Mon Sep 17 00:00:00 2001 From: AZMindroma <69211110+AZMindroma@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:33:08 +0100 Subject: [PATCH 2/5] Updated bot author's username --- src/wordy_commands.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wordy_commands.rs b/src/wordy_commands.rs index 3fde0e1..e5b31d6 100644 --- a/src/wordy_commands.rs +++ b/src/wordy_commands.rs @@ -73,7 +73,7 @@ impl Wordy { ctx.http .answer( &command, - "Made with ❤️ by Inspi#8989\n + "Made with ❤️ by inspirateur\n Repository: ", vec![], ) @@ -83,7 +83,7 @@ impl Wordy { pub async fn register_commands(&self, http: Arc, guild_id: GuildId) { trace!(target: "wordy", "Registering slash commands for Guild {}", guild_id); if let Err(why) = GuildId::set_commands(guild_id, http, vec![ - CreateCommand::new("cloud").description("Discover the word cloud that defines you !"), + CreateCommand::new("cloud").description("Discover the word cloud that defines you!"), CreateCommand::new("emojis").description("Recent emoji usage stats."), CreateCommand::new("info").description("Information about this bot.") ]).await { From 978ed9e6d8e7554144f1b063097b94d653c8cd3b Mon Sep 17 00:00:00 2001 From: AZMindroma <69211110+AZMindroma@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:38:33 +0100 Subject: [PATCH 3/5] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8d077e0..9f7d82f 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,26 @@ # wordy This is the new and improved word cloud Discord bot! -As opposed to the previous Python version, Wordy starts processing the messages as soon as it joins a server and is much faster doing so! +As opposed to the previous Python version, Wordy starts processing the messages as soon as it joins a server and is much faster at doing so! It also automatically continues to process new messages as they are sent. *Related blog article: https://teo-orthlieb.github.io/blog/user-word-cloud/* -## How to run it -The Discord Application creation step is usually the same for all bot that you self-host. +## Self-hosting guide +The Discord Application creation step is usually the same for all bots that you self-host. ### Create a Discord Application -- Go to https://discordapp.com/developers/applications/ and create your app +- Go to https://discord.com/developers/applications/ and create your app - Add a bot to it and copy its token. You will need it later! - Enable `PRESENCE INTENT`, `SERVER MEMBERS INTENT` and `MESSAGE CONTENT INTENT` in the bot tab -- Invite the bot with `https://discord.com/oauth2/authorize?client_id=CLIENT_ID&permissions=101376&integration_type=0&scope=bot+applications.commands` and replace `CLIENT_ID` with the Client ID of your app +- Invite the bot with `https://discord.com/oauth2/authorize?client_id=CLIENT_ID&permissions=101376&integration_type=0&scope=bot+applications.commands` and replace `CLIENT_ID` with the Client ID of your app (which you may find under the OAuth2 tab) **Note:** The OAuth2 link includes following permissions: View Channels, Send Messages, Read Message History (to load messages sent before the bot joined), Attach Files (to send the word cloud image) ### Run it - Clone the project wherever you want -- add the `token.txt` file at the root of the project (the root of the project is not inside the src folder, instead the folder with the Cargo files and the assets and src folder) and paste the token you copied before into the file (without anything else) -- Install the necessary tools to compile Rust programs with https://rustup.rs/ +- Add the `token.txt` file at the root of the project (the root of the project is not inside the src folder, instead the folder with the Cargo files which includes the assets and src folder) and paste the token you copied before into this file (without anything else) +- Install the necessary tools to compile Rust programs by visiting https://rustup.rs/ and copypasting the command into your terminal and following its steps. A standard installation works to build this project. - With a terminal positioned at the root of the project, run `cargo build --release` to build the project. *Note: This will take a while because it's the first build you do, subsequent builds will be much faster.* - Run the project with `cargo run --release` From 8c83968e1c8123fa346377e1e7795e03fc6da9c7 Mon Sep 17 00:00:00 2001 From: AZMindroma <69211110+AZMindroma@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:40:37 +0100 Subject: [PATCH 4/5] Rename test.png to demo.png --- test.png => demo.png | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename test.png => demo.png (100%) diff --git a/test.png b/demo.png similarity index 100% rename from test.png rename to demo.png From f902c60dcf2caeffd4fa1c5c01727898f780245b Mon Sep 17 00:00:00 2001 From: AZMindroma <69211110+AZMindroma@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:41:12 +0100 Subject: [PATCH 5/5] Update image name in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f7d82f..960822d 100644 --- a/README.md +++ b/README.md @@ -30,4 +30,4 @@ The Discord Application creation step is usually the same for all bots that you - Once the messages are loaded (it also works beforehand, which will however not give an extensive result), you can run the bot's slash command `/cloud` to display your word cloud! #### This is how a word cloud might look like: -![Demonstration word cloud](test.png) +![Demonstration word cloud](demo.png)