diff options
| author | seth <[email protected]> | 2023-01-08 21:21:04 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-01-08 21:28:09 -0500 |
| commit | a00262ac5a79360a9466b464173af24db5006148 (patch) | |
| tree | 7e8b01054faf1e80a9d44d34398eaa158cd45adb | |
| parent | abcda5881361d2e219de025c95c4f8728f5caddd (diff) | |
feat: add copypasta command
| -rw-r--r-- | src/moyai_bot/bot.py | 20 | ||||
| -rw-r--r-- | src/moyai_bot/copypastas/__init__.py | 0 | ||||
| -rw-r--r-- | src/moyai_bot/copypastas/happymeal.txt | 1 | ||||
| -rw-r--r-- | src/moyai_bot/copypastas/ismah.txt | 0 | ||||
| -rw-r--r-- | src/moyai_bot/copypastas/sus.txt | 1 | ||||
| -rw-r--r-- | src/moyai_bot/copypastas/ticktock.txt | 8 | ||||
| -rw-r--r-- | src/moyai_bot/lib.py | 54 |
7 files changed, 42 insertions, 42 deletions
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) + + [email protected](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 --- /dev/null +++ b/src/moyai_bot/copypastas/__init__.py 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 --- /dev/null +++ b/src/moyai_bot/copypastas/ismah.txt 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} :(" |
