{"id":18829360,"url":"https://github.com/inspirateur/discordwordcloud","last_synced_at":"2025-04-14T03:33:36.792Z","repository":{"id":46007772,"uuid":"187872313","full_name":"Inspirateur/DiscordWordCloud","owner":"Inspirateur","description":"A discord bot that generates word clouds for discord users.","archived":false,"fork":false,"pushed_at":"2023-09-03T06:15:58.000Z","size":6497,"stargazers_count":28,"open_issues_count":3,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T09:39:29.321Z","etag":null,"topics":["discord","discord-bot","word-cloud","wordcloud-generator"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Inspirateur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-05-21T16:08:22.000Z","updated_at":"2024-03-25T15:55:38.000Z","dependencies_parsed_at":"2024-02-17T10:44:31.784Z","dependency_job_id":null,"html_url":"https://github.com/Inspirateur/DiscordWordCloud","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inspirateur%2FDiscordWordCloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inspirateur%2FDiscordWordCloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inspirateur%2FDiscordWordCloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inspirateur%2FDiscordWordCloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Inspirateur","download_url":"https://codeload.github.com/Inspirateur/DiscordWordCloud/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248815945,"owners_count":21165988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord","discord-bot","word-cloud","wordcloud-generator"],"created_at":"2024-11-08T01:44:29.217Z","updated_at":"2025-04-14T03:33:31.783Z","avatar_url":"https://github.com/Inspirateur.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DiscordWordCloud\n⚠️*This version is outdated, I've rewrote the bot in Rust here https://github.com/Inspirateur/wordy* ⚠️  \nA Python 3.9 discord bot that generates a word cloud (now with emojis !) for each discord user.\n\n## How to run it\n\n### Register Discord Application\n- go to https://discordapp.com/developers/applications/ create your app\n  - add a User Bot to it and paste its Token in `token.txt`\n  - enable `SERVER MEMBERS INTENT` and `MESSAGE CONTENT INTENT` in the bot tab  \n  - invite the bot with `https://discord.com/api/oauth2/authorize?client_id=CLIENT_ID\u0026permissions=0\u0026scope=bot%20applications.commands` replace `CLIENT_ID` with the Client ID of your app\n\n\n### Run Locally\n- Clone the project wherever you want\n- Install Python 3.9 from https://www.python.org/ (you can probably use an older version too)\n- Install the requirements listed in `requirements.txt` with `pip`\n  - use `python -m pip install -r requirements.txt` at the root of the project\n  - consult this guide if you need help with pip https://packaging.python.org/tutorials/installing-packages/\n- add a `token.txt` file at the root of the project\n- run `main.py` with Python 3.9\n\n### Run with Docker\n```\ndocker run -e TOKEN=TOKEN_FROM_ABOVE_GOES_HERE mrhazel/discord-word-cloud\n```\n\n\nIf you got any questions about this project, feel free to DM `Inspi#8989` on Discord.\n\n## Features\n- `;load (days)` use this to load messages up to x days on your server \n- `;cloud` to generate your word cloud, you can also tag someone in the command to generate their word cloud\n- `;emojis` to get the custom emojis usage of the server\n\n## Pictures\n\n![](https://github.com/Inspirateur/DiscordWordCloud/blob/master/screenshots/emojis.png) ![](https://github.com/Inspirateur/DiscordWordCloud/blob/master/screenshots/cloud.png) \n\n\n## How it works\n\nHere's a step by step of how the bot makes a wordcloud:\n- after `;load` \n  - for each word `w` and user `u`, compute `p(w|u)`, the probability of `u` writing `w` *(this data is separated between servers)*\n- after `;cloud` \n  - for each word `w` and the user `u` for which the cloud is, compute `p(w|u)/p(w)`, this quantifies how much `u` *favors* `w` compared to everyone else\n  - uses the WordCloud lib to make a word cloud image, scaling the words in proportion to their scores (they are placed randomly)\n  \nSome notes regarding this model:\n- This model as-is would be filled with typos, bits of url and words that have only been written by `u` because `p(w|u)/p(w)` would be high; to counter this, a value `α` is added to every `p(w|u)` as if each user had at least an `α` probability of writing any word.\n  This regularisation has the downside of putting some words that were never written by `u` in the word cloud. \n- A strong point of this model is that it works in any language and stop-words such as *and, the, a, etc.*\nare often excluded because they are not favored by anyone in particular.\n- One limitation of the model is that it does not handle expressions bigger than a single word or emoji.\n\nThe code is written so that implementing a new model is easy, by subclassing `WCModel` in `wcmodel.py`, \nand importing your custom class instead of `WCBaseline` in `main.py` ! \n\n## Powered by:\n\n- Pycord: https://github.com/Pycord-Development/pycord\n- WordCloud: https://github.com/amueller/word_cloud\n- Twemoji: https://twemoji.twitter.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finspirateur%2Fdiscordwordcloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finspirateur%2Fdiscordwordcloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finspirateur%2Fdiscordwordcloud/lists"}