Guess who's the message author! Bring life to small communities.
Who's That was born from my desire to infuse my primary Discord hangout server with fun and interactivity. In a server filled with quirky and occasionally borderlines convos, I had the idea of adding a guessing game element to spice things up.
So, over the course of a weekend, I brought this concept to life.
This particular bot is just one of the many Discord bots I've created. I believe that sharing it would please some people servers, so here you go!
Thank you GPT-3 for the cringy demo messages 🫠
Pick carefully the best message 😎
When typing /whosthat
you will be prompt with 1
to 10
random messages.
You can pick your desired message with the corresponding button, or reload messages with the 🔁 button.
Author is not visible so you can also play the game. 😎
The picked message will be sent to the Who's That channel.
Let your friends guess who's behind the (cringy) message 🕵️
The picked message will then appear in the Who's That channel. #BossBattleConquered 👍😃
Challenge your friends 🏆
Leaderboard will show total points, correct answers, position.
Point rules:
+1
point for participating
+1
point for correctly guessing
This is subject to change.
Target: channel where to fetch messages from.
Picker: channel where to pick message from.
Who's That: channel where to send message to.
Make sure to lock the Who's That channel to make it view only to keep it clean,
and make the Picker channel private.
After setting up the channels, you will be prompt to pick users 👥
Picking users will filter the messages to only show the selected users messages.
Select as many users as you want.
You can change the users list with
/users
command at any time.
You're all set! 🎉
You can begin with /whosthat
command.
Target channel will fetch message Ids called "checkpoints" (each 100 messages) to avoid fetching all messages at once.
For example, if you have 1000 messages in your target channel, the bot will fetch 10 checkpoints (100 messages each) and add them to a list.
From my experience, fetching 100 000 messages takes roughly 15–20 minutes.
When you request Who's That messages to pick, the bot will randomly pick 2 checkpoints from the list, and fetch 100 messages from the checkpoint.
Then, the bot will randomly pick 5 messages from each checkpoint, and send them to the picker channel. Take note that the bot will filter messages along the process.
The bot will filter messages that are too short, that contains a link, attachment, embed, contains only an emoji or a discord mention. And obviously, only messages that are from picked users.
When you pick a message, the bot will send it to the Who's That channel.
This sent message will contain a select with 5 choices (4 random users and the author).
When you pick a user, the bot will check if the user is the correct one.
Check above rules for points attribution.
The leaderboard is accessible on each Who's That message with a button or with /leaderboard
command.
The leaderboard will show 10 players per page.
Because of the fetching system of the bot that request a lot of API calls, I will not provide a public version of the bot. Watch out for large channel fetchs that can cause your application to be banned (I didn't tried fetching more than 200k messages).
yes yes oui oui
Feel free to report any bad translations, bugs, features requests...
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
MIT License Copyright (c) 2023 Pexilo
Simply give me a ⭐️ to support me! 😄
- 📃 Node.js 16.9 or higher
- 🍃 MongoDB cluster
- 🤖 Discord Bot
- Create an account
- Create a cluster
- Connect it with "connect your application"
- Copy your connection string
- Replace
<password>
with your database access user password - Keep it for later use
- Log in to your Discord account on the Discord Developer Portal website (Discord Developer Portal).
- Click the "New Application" button to create a new application.
- Give your application a name and click "Create."
- In the left panel, click on "Bot" in the menu.
- Click the "Add Bot" button.
- Under the "Token" section, click "Copy" to copy the bot's token. Use "Reset" if you can't copy it right away.
- Keep your token and client ID for later use
- Under the "Privileged Gateway Intents" section, enable "Servers Members" & "Message Content" intents.
- Clone the repo
git clone https://github.com/Pexilo/Whos-That
- Finish the above steps
- Replace
<clientId>
with your bot ID / client ID
https://discord.com/api/oauth2/authorize?client_id=<clientId>&permissions=117760&scope=applications.commands%20bot
- Invite your bot with the above link to your server
- Replace content of
example.env
DISCORD_TOKEN=your-bot-token
MONGO_URI=your-mongo-db-connection-string
- Rename the file
example.env
>.env
src/config.ts
Edit commented lines
import * as dotenv from "dotenv";
dotenv.config();
export default {
DISCORD_TOKEN: process.env.DISCORD_TOKEN,
MONGO_URI: process.env.MONGO_URI,
SLASH_COMMANDS_IDS: {
users: "1118657612783812622", //Edit this Id with your command Id
setup: "1118657612783812621", //Also here
whosthat: "1119193500429336669", //And here
},
};
On the bot Discord server:
server settings > integrations > select Who's That bot
- Install dependencies
npm i
- Start the bot
npm run start
And much more like @napi-rs/canvas, Discord Avatar Maker for message previews.