From a00262ac5a79360a9466b464173af24db5006148 Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 8 Jan 2023 21:21:04 -0500 Subject: feat: add copypasta command --- src/moyai_bot/bot.py | 20 ++++++++++++- src/moyai_bot/copypastas/__init__.py | 0 src/moyai_bot/copypastas/happymeal.txt | 1 + src/moyai_bot/copypastas/ismah.txt | 0 src/moyai_bot/copypastas/sus.txt | 1 + src/moyai_bot/copypastas/ticktock.txt | 8 +++++ src/moyai_bot/lib.py | 54 ++++++++-------------------------- 7 files changed, 42 insertions(+), 42 deletions(-) create mode 100644 src/moyai_bot/copypastas/__init__.py create mode 100644 src/moyai_bot/copypastas/happymeal.txt create mode 100644 src/moyai_bot/copypastas/ismah.txt create mode 100644 src/moyai_bot/copypastas/sus.txt create mode 100644 src/moyai_bot/copypastas/ticktock.txt (limited to 'src/moyai_bot') diff --git a/src/moyai_bot/bot.py b/src/moyai_bot/bot.py index b2fceca..8ba5ac0 100644 --- a/src/moyai_bot/bot.py +++ b/src/moyai_bot/bot.py @@ -1,8 +1,10 @@ import discord +from discord import app_commands from discord.ext import commands -from moyai_bot.lib import get_random_response +from moyai_bot.lib import get_copypasta, get_random_response +SERVER_ID = discord.Object(id=1055663552679137310) intents = discord.Intents.default() intents.message_content = True # pylint: disable=assigning-non-slot moyai = commands.Bot(command_prefix="m!", description="moyai", intents=intents) @@ -11,6 +13,8 @@ moyai = commands.Bot(command_prefix="m!", description="moyai", intents=intents) @moyai.event async def on_ready(): print(f"logged in as {moyai.user}") + await moyai.tree.sync(guild=SERVER_ID) + print("ready!") @moyai.event @@ -41,3 +45,17 @@ async def moyaispam(ctx: commands.Context): for _ in range(30): msg += str(discord.utils.get(moyai.emojis, name="moyai")) await ctx.send(msg) + + +@moyai.tree.command(name="copypasta", + description="send funni copypasta", + guild=SERVER_ID) +@app_commands.choices(choices=[ + app_commands.Choice(name="happymeal", value="happymeal"), + app_commands.Choice(name="ismah", value="ismah"), + app_commands.Choice(name="sus", value="sus"), + app_commands.Choice(name="ticktock", value="ticktock") +]) +async def copypasta(i: discord.Interaction, choices: app_commands.Choice[str]): + msg = get_copypasta(choices.value) + await i.response.send_message(msg) diff --git a/src/moyai_bot/copypastas/__init__.py b/src/moyai_bot/copypastas/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/moyai_bot/copypastas/happymeal.txt b/src/moyai_bot/copypastas/happymeal.txt new file mode 100644 index 0000000..a186e78 --- /dev/null +++ b/src/moyai_bot/copypastas/happymeal.txt @@ -0,0 +1 @@ +OH MY GOD ITS 3 IN THE MORNING AND IM IN MCDONALDS AND WE JUST FOUND OUT THAT WHEN U PULL UP IN MCDONALDS AT 3 AM YOU CAN BUY THE AMONG US HAPPY MEAL WITH A TOY IN IT WHICH IS EITHER THE IMPOSTOR OR THE CREWMATE AND IF YOU DONT KNOW WHAT AMONG US IS YOU MUST BE MUST REALLY BE LIVING UNDER A ROCK ITS AN AWESOME GAME WITH IMPOSTORS AND CREWMATES AND BASICALLY THE IMPOSTOR TRIES TO SABOTAGE THE WHOLE GAME AND THE CREWMATES NEED TO STOP HIM BUT APPARENTLY WHEN YOU PURCHASE THE AMONG US HAPPY MEAL SOMETHING SCARY HAPPENS \ No newline at end of file diff --git a/src/moyai_bot/copypastas/ismah.txt b/src/moyai_bot/copypastas/ismah.txt new file mode 100644 index 0000000..e69de29 diff --git a/src/moyai_bot/copypastas/sus.txt b/src/moyai_bot/copypastas/sus.txt new file mode 100644 index 0000000..a381e3e --- /dev/null +++ b/src/moyai_bot/copypastas/sus.txt @@ -0,0 +1 @@ +HOLY SHIT DID YOU JUST SAY THE WORD SUS???😳1?/1😱//1😳/1111!!!! Wait, you don't know what it is from?😳😳😳Let πŸ‘†give you a brief r/history. πŸ“šπŸ“šπŸ“šπŸ‘¨β€πŸš€If you didn't r/knowyourshit, the r/term sus(suspicious) is a saying from the r/popular r/game r/AmongUs. Among us is so funπŸ˜” πŸ‘‰πŸ‘ˆ, don't insult it, every youtuber and streamer says so!!!!!!!11 Corpses voice is so deep am i right or am i right😳😳????? I mean Mr beast and Dream play and pull big 🧠 1000000000000 iq moves in their videos..... YOU WERE THE IMPOSTER.... ࢞ ࢞ ࢞ Get it because you don't know what sus means? r/stupidquestions r/youranidot r/stupidcuck. I CAnT BELEeVE YOUU dont KNoW WHT SUS MeaNS?/??!??!?!!πŸ–•πŸ–•πŸ–•πŸ–•πŸ–• Man why do i have to r/explain this to a r/idiotπŸ€ͺπŸ€ͺπŸ€ͺπŸ“šπŸ“šπŸ“š... Sus is a GREAT WORD from a GREAT VIDEO GAME. in class, YOU CAN PLAY IT ON YOUR PHONE😜😜😜😜😜😜??!?!? such a masterpiece... FOR THE GREAT PRICE OF FREE!!!11!πŸ’°πŸ’°πŸ€‘πŸ€‘πŸ€‘πŸ€‘πŸ˜œπŸ˜œπŸ˜œπŸ’°πŸ’° It can also mean gay 😳😳😳😳 \ No newline at end of file diff --git a/src/moyai_bot/copypastas/ticktock.txt b/src/moyai_bot/copypastas/ticktock.txt new file mode 100644 index 0000000..22beb4a --- /dev/null +++ b/src/moyai_bot/copypastas/ticktock.txt @@ -0,0 +1,8 @@ +Tick-tock +Heavy like a Brinks truck +Looking like I'm tip-top +Shining like a wristwatch +Time will grab your wrist +Lock it down 'til the thing pop +Can you stick around for a minute 'til the ring stop? +Please, God \ No newline at end of file diff --git a/src/moyai_bot/lib.py b/src/moyai_bot/lib.py index 7ba0864..45f2099 100644 --- a/src/moyai_bot/lib.py +++ b/src/moyai_bot/lib.py @@ -1,7 +1,10 @@ +import importlib.resources import random import discord +from moyai_bot import copypastas + def get_random_response(moyai): responses = [ @@ -16,47 +19,16 @@ def get_random_response(moyai): "moyai", "i like y***", "fard", - "OH MY GOD ITS 3 IN THE MORNING AND IM IN MCDONALDS AND WE JUST " + - "FOUND OUT THAT WHEN U PULL UP IN MCDONALDS AT 3 AM YOU CAN BUY THE " + - "AMONG US HAPPY MEAL WITH A TOY IN IT WHICH IS EITHER THE IMPOSTOR OR " - + - "THE CREWMATE AND IF YOU DONT KNOW WHAT AMONG US IS YOU MUST BE MUST " - + - "REALLY BE LIVING UNDER A ROCK ITS AN AWESOME GAME WITH IMPOSTORS AND " - + - "CREWMATES AND BASICALLY THE IMPOSTOR TRIES TO SABOTAGE THE WHOLE GAME " - + - "AND THE CREWMATES NEED TO STOP HIM BUT APPARENTLY WHEN YOU PURCHASE " - + "THE AMONG US HAPPY MEAL SOMETHING SCARY HAPPENS", - "Tick-tock \n Heavy like a Brinks truck \n Looking like I'm tip-top \n" - + - "Shining like a wristwatch \n Time will grab your wrist \n Lock it down " - + - "'til the thing pop \n Can you stick around for a minute 'til the ring " - + "stop? \n Please, God", - "HOLY SHIT DID YOU JUST SAY THE WORD SUS???😳1?/1😱//1😳/1111!!!! Wait, " - + - "you don't know what it is from?😳😳😳Let πŸ‘†give you a brief r/history. πŸ“š" - + - "πŸ“šπŸ“šπŸ‘¨β€πŸš€If you didn't r/knowyourshit, the r/term sus(suspicious) is a" + - "saying from the r/popular r/game r/AmongUs. Among us is so funπŸ˜” πŸ‘‰πŸ‘ˆ, " - + - "don't insult it, every youtuber and streamer says so!!!!!!!11 Corpses " - + - "voice is so deep am i right or am i right😳😳????? I mean Mr beast and " - + - "Dream play and pull big 🧠 1000000000000 iq moves in their videos..... " - + - "YOU WERE THE IMPOSTER.... ࢞ ࢞ ࢞ Get it because you don't know what sus " - + - "means? r/stupidquestions r/youranidot r/stupidcuck. I CAnT BELEeVE " + - "YOUU dont KNoW WHT SUS MeaNS?/??!??!?!!πŸ–•πŸ–•πŸ–•πŸ–•πŸ–• Man why do i have to " + - "r/explain this to a r/idiotπŸ€ͺπŸ€ͺπŸ€ͺπŸ“šπŸ“šπŸ“š... Sus is a GREAT WORD from a GREAT " - + - "VIDEO GAME. in class, YOU CAN PLAY IT ON YOUR PHONE😜😜😜😜😜😜**??!?!?** " - + - "such a masterpiece... FOR THE GREAT PRICE OF FREE!!!11!πŸ’°πŸ’°πŸ€‘πŸ€‘πŸ€‘πŸ€‘πŸ˜œπŸ˜œπŸ˜œπŸ’°πŸ’° It " - + "can also mean gay 😳😳😳😳", str(discord.utils.get(moyai.emojis, name="moyai")), ] return random.choice(responses) + + +def get_copypasta(name): + try: + res = importlib.resources.read_text(copypastas, name + ".txt") + if res != "": + return res + except OSError: + pass + return f"couldn't send copypasta: {name} :(" -- cgit v1.2.3