Skip to content

Commit

Permalink
fix: truth command
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik K committed Oct 29, 2023
1 parent ac64bd1 commit fad9890
Show file tree
Hide file tree
Showing 4 changed files with 1,863 additions and 1 deletion.
102 changes: 102 additions & 0 deletions src/commands/game/truth.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
import {
EmbedBuilder,
SlashCommandBuilder,
ActionRowBuilder,
ButtonBuilder,
MessageActionRowComponentBuilder,
} from "discord.js";
import shuffle from "../../util/shuffle";
import { captureException } from "@sentry/node";
import { ChatInputCommand } from "../../models";
import { getTruth } from "../../util/Functions/jsonImport";

const command: ChatInputCommand = {
requireGuild: true,
data: new SlashCommandBuilder()
.setName("truth")
.setDescription("Post a random truth question")
.setDMPermission(false)
.setDescriptionLocalizations({
de: "Sende eine zufällige wahrheits frage",
"es-ES": "Publicar una pregunta de verdad al azar",
fr: "Publier une question de vérité aléatoire",
}),

/**
* @param {CommandInteraction} interaction
* @param {WouldYou} client
* @param {guildModel} guildDb
*/
execute: async (interaction, client, guildDb) => {
var Truth = await getTruth(guildDb.language);
console.log(Truth)
const dbquestions = guildDb.customMessages.filter(
(c) => c.type !== "nsfw" && c.type === "truth",
);

let truthordare = [] as string[];

if (!dbquestions.length) guildDb.customTypes = "regular";

switch (guildDb.customTypes) {
case "regular":
truthordare = shuffle([...Truth]);
break;
case "mixed":
truthordare = shuffle([
...Truth,
...dbquestions.map((c) => c.msg),
]);
break;
case "custom":
truthordare = shuffle(dbquestions.map((c) => c.msg));
break;
}

const Random = Math.floor(Math.random() * truthordare.length);

const truthembed = new EmbedBuilder()
.setColor("#0598F6")
.setFooter({
text: `Requested by ${interaction.user.username} | Type: Random | ID: ${Random}`,
iconURL: interaction.user.avatarURL() || "",
})
.setDescription(truthordare[Random]);

const row = new ActionRowBuilder<MessageActionRowComponentBuilder>();
if (Math.round(Math.random() * 15) < 3) {
row.addComponents([
new ButtonBuilder()
.setLabel("Invite")
.setStyle(5)
.setEmoji("1009964111045607525")
.setURL(
"https://discord.com/oauth2/authorize?client_id=981649513427111957&permissions=275415247936&scope=bot%20applications.commands",
),
]);
}
row.addComponents([
new ButtonBuilder()
.setLabel("Truth")
.setStyle(1)
.setCustomId(`truth`),
new ButtonBuilder()
.setLabel("Dare")
.setStyle(2)
.setCustomId(`dare`),
new ButtonBuilder()
.setLabel("Random")
.setStyle(3)
.setCustomId(`random`),
]);

interaction
.reply({ embeds: [truthembed], components: [row] })
.catch((err) => {
captureException(err);
});
},
};

export default command;

219 changes: 219 additions & 0 deletions src/data/dare-en_EN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
[
"Take a shot of mustard or ketchup.",
"Howl like a wolf",
"Go to the first person you know on your instagram feed and like every photo on their profile.",
"Try to tickle yourself",
"Have a matching pfp with who you like for 3 days.",
"Send/say the alphabet backwards",
"Prank call McDonalds",
"Send your worst playlist",
"Send your best friend \"I hate you\" and don't respond to any of their messages.",
"Show everyone the funniest meme in your camera roll.",
"Call your parents and talk about the weather in a british accent",
"Type with only one hand for the next minute",
"Text your number neighbor (phone number one less or one more than you)",
"Eat an ice cube",
"Show everyone your frequently used emoji list.",
"Let the group choose your profile picture for the next day",
"Name as many types of car as you can",
"Make up a country song off the top of your head",
"Make a poem using the words orange and moose",
"Show the group an embarrassing photo from your childhood.",
"Send a screenshot of the bottom of your DMs list",
"Spin around 10 times and try to walk straight.",
"Post the fanciest photo you've ever taken",
"Post your favorite pet photo",
"Give yourself a haircut.",
"Everyone here take a snack break - ToD Bot team.",
"List the things on your desk",
"Show everyone here the last 5 messages with the last person you messaged/messaged you.",
"Point out the worst dressed person in the room.",
"Give your friends your unlocked phone for 30 seconds",
"Post the oldest photo on your phone",
"Switch to Discord light mode for the rest of the day",
"Show everyone the last YouTube video you watched.",
"Be really annoying for the next minute",
"Send a sentence without the words: but, a, the, or",
"Block the fifth person in your DMs.",
"Name as many types of food as you can",
"Delete the last 10 pictures in your camera roll permanently (remove them from recently deleted too).",
"Post your favorite photo on your phone",
"Answer the next truth question with complete honesty",
"Share your phone's wallpaper",
"Act like a dog for 1 minute.",
"Show everyone a picture of you when you were young.",
"Hug the object/person nearest you.",
"Do a yoga pose for 3 minutes.",
"Let someone go through your YouTube history and read it out to the group.",
"Prank call your best friend",
"Talk with a Russian accent for the next 3 rounds",
"Call a relative. The group can ask one question.",
"Tweet '*insert popular band name here* fans are the worst' and don't reply to any of the angry comments.",
"Send a Snapchat to your ex.",
"Send a photo of your desk",
"Send a weird picture of yourself.",
"Send your favorite meme",
"Eat a packet of hot sauce.",
"Ask a random person in this server if you've met them before",
"Show everyone an embarrassing childhood picture of you.",
"Draw a face around your belly button.",
"Use a furry pfp for 24 hours",
"Show the group the insides of your closet.",
"Let someone here do your makeup.",
"Have everyone here list something they like about you",
"Name one thing you would change about each person here.",
"Do your best impersonation of the question asker or someone in the group.",
"Take a shot of lemon juice, and take one more every time someone picks dare.",
"List everything in your wallet",
"Prank call McDonalds",
"Call someone random, and say everything in a british accent",
"Change your nickname/username to whatever the group wants.",
"Spin an imaginary hula hoop around your waist for 1 minute.",
"Screen share your search history from today.",
"Send your crush something wholesome",
"Send the most cringe message ever",
"Send picture of your pet.",
"Spin around for 30 seconds",
"Show your lock screen and wallpaper.",
"Show everyone the last picture in your camera roll.",
"Type as fast as you can for the next minute",
"Say UWU for as long as possible",
"Name as many countries as you can",
"Post an embarrassing photo on your Instagram story.",
"Show everyone here your screen time.",
"Imitate a behaviour of who you like.",
"Talk in a very deep voice for the next round",
"Prank call your crush",
"Sing a lullaby in VC.",
"Text your parents \"something crazy just happened\" and share what they say",
"Call a random person and sing happy birthday to them",
"Show everyone here the worst picture of you that you can find.",
"Do an impression of your favorite celebrity",
"Name every ocean",
"Send a passive-aggressive message to a friend",
"Type with only one finger for the next minute",
"Ghost ping the person you like.",
"Sing a song for the group.",
"Send the fifth person in your message history 20 seconds of keyboard spam.",
"Spill the last secret someone told you.",
"Tell your best friend that you're a furry",
"Tell your funniest joke to the group.",
"Sing a song of the groups choice, in a VC.",
"Don't charge your phone until it dies.",
"Post a selfie.",
"Eat a piece of paper.",
"Send a message to the person at the bottom of your DMs list",
"DM someone \"hi\" and respond with \"banana\" to everything they say",
"Speak only in emojis for the next 5 minutes",
"Stand up and spin in a circle three times.",
"Lick the floor.",
"Name one thing you would change about each person here.",
"Close your eyes and send a blind message to a random person",
"Take a picture of yourself and show it to the group.",
"Ask the first person in your DMs to marry you.",
"Text the last 6 people in your DMs 'I love you'.",
"Scream at the top of your lungs whatever the chat wants.",
"Invite anyone in the group's choosing to join the call.",
"Send one of your favorite playlists!",
"Rickroll someone",
"Screenshot your most played songs and show it to the group.",
"Voice act a cartoon character of the group's choice.",
"Describe the last dream you had.",
"Do an impression of someone until another player can guess who you are",
"Fake cry for the group.",
"Name as many cities as you can",
"Do a cartwheel.",
"Put on makeup if you don't wear makeup and it's available, take off all your makeup if you're wearing it.",
"Type with your fists for the next minute",
"List everyone as the emoji(s) you think best fits them.",
"Prank call the last person that called you",
"List everyone as the kind of animal you see them as.",
"Show everyone your DMs list",
"Ping a friend to join!",
"Talk in an accent for the next 10 minutes.",
"Ghost ping someone",
"Message someone you argued with and tell them that you're sorry.",
"Hold your breath for 10 seconds",
"Listen to a country song",
"Type without vowels for the next minute",
"Share the most recent photo on your phone with the group.",
"Do an impression of your most annoying teacher",
"Show everyone your screen time",
"Send a photo of where you are",
"Send your youtube watch history",
"Show everyone your recent calls",
"Let the group pose you in an embarrassing position and take a picture.",
"Send a message only using your toes",
"Send a picture of your favourite stuffed animal.",
"Wear a clothing item often associated with a different gender tomorrow",
"Link everyone to the last song you listened to.",
"Type with only the left side of your keyboard for the next minute",
"Tell everyone your honest opinion of the person who sent this command.",
"Choose 3 people here and tell them the latest lie you told to them here (not in DMs).",
"Send a meme you've made",
"Try not to blink for as long as possible",
"Tell your best friend that you'll always be with them no matter what :)",
"Text the third person in your message history 'last night was great' with a heart.",
"Prank call your enemy",
"Tie your shoe strings together and try to walk to the door and back",
"Show everyone here your last 10 google searches.",
"Show the list of people in your DMs.",
"Everyone go get a drink of water - ToD Bot Team",
"Let the group decide your status for 7 days.",
"Let the group look through your phone for 30 seconds.",
"Make up a rap and sing it for 30 seconds",
"Show everyone something you wrote/drew when you were younger.",
"Lick your nose",
"Describe the object closest to you until the group guesses the object.",
"Have someone in the group ask a question that you must answer",
"Imitate your least favorite celebrity",
"Let the group decide your outfit for tomorrow.",
"Send a message to someone you haven't talked to in a year",
"Call one of your parents and then tell them they are grounded for a week",
"Make/bake a cake.",
"Send a picture of your eyes.",
"Use Discord light theme for an hour",
"Ask your dad for a dad joke and send it",
"Text the first six people in your message history 'a' and don't reply if they bring it up.",
"Do as many pushups or situps as you can in a minute.",
"Try to lick your elbow",
"Play the last song you listened to. No lying!",
"Send the last meme you saved to your phone",
"Set your cell phone language to Spanish for the next 10 minutes",
"Sharpie an embarrassing message on any part of the body covered by clothing.",
"Hum a song of your choice, don’t stop until someone correctly guesses the song",
"Talk in an accent for the next 3 rounds",
"Change your phone wallpaper to the choice of the group for 7 days.",
"Text your crush and tell them how cool they are",
"Don't touch your phone for an hour after the game is over.",
"Show everyone the earliest picture in your camera roll.",
"Play a song of the next person's choosing.",
"Share one of your playlists",
"Breakdance for the group.",
"Pretend to be another player for the next round",
"Paint your fingernails with a crayon",
"Tell the other players something they don't know about you",
"Send the worst meme you've made",
"Lick the bottom of your shoe/foot.",
"Post the latest photo you took to instagram",
"Text your best friend \"something crazy just happened\" and don't respond",
"Describe everyone in the room in three words.",
"Let your friends post something on your social media",
"Send your favorite joke",
"Tell the other players something you've never told anyone before",
"Everything you say for the next 5 rounds has to rhyme.",
"Send the first word that comes to your mind right now",
"Take a picture of you doing over-done ducklips.",
"Call your first DM for no reason",
"Google images the first word that comes to your head and send the first image",
"Show the group an embarrasing picture of you.",
"Send a song you're embarrassed to listen to",
"Use your non-dominant hand for an hour",
"Ask someone random for a hug",
"Show the group your latest YouTube searches",
"Put ice in your clothes and wait until it melts.",
"Tell the group something about you that you've never told them before",
"Take a sniff of everyone playing.",
"Ask a friend for their mom's phone number",
"Make an owo emote for the group."
]
Loading

0 comments on commit fad9890

Please sign in to comment.