From 577a4da1f1f33890e63f5bf07da427a63ce038a9 Mon Sep 17 00:00:00 2001 From: rkh00 <33283775+rkh00@users.noreply.github.com> Date: Tue, 5 Mar 2024 20:10:30 +0100 Subject: [PATCH 1/4] Added "if only you knew how bad things really are" For the memes --- src/cogs/misc.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/cogs/misc.py b/src/cogs/misc.py index 6e272f4..68b963c 100644 --- a/src/cogs/misc.py +++ b/src/cogs/misc.py @@ -3,6 +3,7 @@ import urllib from datetime import datetime from hashlib import md5 from io import BytesIO +import random import discord import requests @@ -332,6 +333,29 @@ class Misc(commands.Cog): embed.set_image(url=f"attachment://{interaction.user.id}_{bruker.id}_match.png") await interaction.response.send_message(embed=embed, file=f) + @app_commands.checks.bot_has_permissions(embed_links=True) + @app_commands.checks.cooldown(1, 2) + @app_commands.command(name="ifonlyyouknew", description="How bad things really are") + async def weeb(self, interaction: discord.Interaction): + """ + If only you knew how bad things really are. + + Parameters + ---------- + interaction (discord.Interaction): Slash command context object + """ + + links = [ + "https://cdn.discordapp.com/attachments/747542544291987597/973603487541772369/leanderbad.png?ex=65f9ab68&is=65e73668&hm=8557b40aeab3b4b1ce70d1649d1a7409ec623dcb7a31eca55847aa22cf22493a&", + "https://cdn.discordapp.com/attachments/747542544291987597/973603305467043850/unknown.png?ex=65f9ab3c&is=65e7363c&hm=8f7f06dd01fdcd9f2f2d6fb0740a1b7986a28277e271229ddb03822a268f0f6a&", + "https://cdn.discordapp.com/attachments/811606213665357824/955206225681875015/73D1B4ED-BD2E-4BCB-9032-67BF9AEAF4B2.jpg?ex=65f7571f&is=65e4e21f&hm=9677e9d8f4ff0a6ac17095e8572e904b7bd2b49134e972201113cc8666e66319&", + "https://cdn.discordapp.com/attachments/811606213665357824/987321261690605618/Snapchat-1438586183.jpg?ex=65f43414&is=65e1bf14&hm=831c0f74dfc5a590a564aa8713c29fe1a759ba9d8aa0febd49d6186b3aeddaed&" + ] + + random_link = random.choice(links) + + await interaction.response.send_message(random_link) + async def setup(bot: commands.Bot): """ From 7bd9247af4fed801f5c7820725d9a52ee09eb3b5 Mon Sep 17 00:00:00 2001 From: rkh00 <33283775+rkh00@users.noreply.github.com> Date: Tue, 5 Mar 2024 20:14:36 +0100 Subject: [PATCH 2/4] Update misc.py holy shit that was a dumb error --- src/cogs/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cogs/misc.py b/src/cogs/misc.py index 68b963c..4760144 100644 --- a/src/cogs/misc.py +++ b/src/cogs/misc.py @@ -336,7 +336,7 @@ class Misc(commands.Cog): @app_commands.checks.bot_has_permissions(embed_links=True) @app_commands.checks.cooldown(1, 2) @app_commands.command(name="ifonlyyouknew", description="How bad things really are") - async def weeb(self, interaction: discord.Interaction): + async def howbadthingsreallyare(self, interaction: discord.Interaction): """ If only you knew how bad things really are. From 13e4c01271563f37a38ddf0eb6a68afdd3b59f4d Mon Sep 17 00:00:00 2001 From: rkh00 <33283775+rkh00@users.noreply.github.com> Date: Tue, 5 Mar 2024 20:16:45 +0100 Subject: [PATCH 3/4] is this a goddamn whitespace error --- src/cogs/misc.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/cogs/misc.py b/src/cogs/misc.py index 4760144..60364d9 100644 --- a/src/cogs/misc.py +++ b/src/cogs/misc.py @@ -337,24 +337,24 @@ class Misc(commands.Cog): @app_commands.checks.cooldown(1, 2) @app_commands.command(name="ifonlyyouknew", description="How bad things really are") async def howbadthingsreallyare(self, interaction: discord.Interaction): - """ - If only you knew how bad things really are. - - Parameters - ---------- - interaction (discord.Interaction): Slash command context object - """ - - links = [ - "https://cdn.discordapp.com/attachments/747542544291987597/973603487541772369/leanderbad.png?ex=65f9ab68&is=65e73668&hm=8557b40aeab3b4b1ce70d1649d1a7409ec623dcb7a31eca55847aa22cf22493a&", - "https://cdn.discordapp.com/attachments/747542544291987597/973603305467043850/unknown.png?ex=65f9ab3c&is=65e7363c&hm=8f7f06dd01fdcd9f2f2d6fb0740a1b7986a28277e271229ddb03822a268f0f6a&", - "https://cdn.discordapp.com/attachments/811606213665357824/955206225681875015/73D1B4ED-BD2E-4BCB-9032-67BF9AEAF4B2.jpg?ex=65f7571f&is=65e4e21f&hm=9677e9d8f4ff0a6ac17095e8572e904b7bd2b49134e972201113cc8666e66319&", - "https://cdn.discordapp.com/attachments/811606213665357824/987321261690605618/Snapchat-1438586183.jpg?ex=65f43414&is=65e1bf14&hm=831c0f74dfc5a590a564aa8713c29fe1a759ba9d8aa0febd49d6186b3aeddaed&" - ] - - random_link = random.choice(links) - - await interaction.response.send_message(random_link) + """ + If only you knew how bad things really are. + + Parameters + ---------- + interaction (discord.Interaction): Slash command context object + """ + + links = [ + "https://cdn.discordapp.com/attachments/747542544291987597/973603487541772369/leanderbad.png?ex=65f9ab68&is=65e73668&hm=8557b40aeab3b4b1ce70d1649d1a7409ec623dcb7a31eca55847aa22cf22493a&", + "https://cdn.discordapp.com/attachments/747542544291987597/973603305467043850/unknown.png?ex=65f9ab3c&is=65e7363c&hm=8f7f06dd01fdcd9f2f2d6fb0740a1b7986a28277e271229ddb03822a268f0f6a&", + "https://cdn.discordapp.com/attachments/811606213665357824/955206225681875015/73D1B4ED-BD2E-4BCB-9032-67BF9AEAF4B2.jpg?ex=65f7571f&is=65e4e21f&hm=9677e9d8f4ff0a6ac17095e8572e904b7bd2b49134e972201113cc8666e66319&", + "https://cdn.discordapp.com/attachments/811606213665357824/987321261690605618/Snapchat-1438586183.jpg?ex=65f43414&is=65e1bf14&hm=831c0f74dfc5a590a564aa8713c29fe1a759ba9d8aa0febd49d6186b3aeddaed&" + ] + + random_link = random.choice(links) + + await interaction.response.send_message(random_link) async def setup(bot: commands.Bot): From c585f8e71ae664b27948522833ac17667e38fd5e Mon Sep 17 00:00:00 2001 From: Leander Furumo Date: Tue, 5 Mar 2024 20:29:24 +0100 Subject: [PATCH 4/4] remove expiry date from media links + stylistic changes --- src/cogs/misc.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cogs/misc.py b/src/cogs/misc.py index 60364d9..a6f5aa1 100644 --- a/src/cogs/misc.py +++ b/src/cogs/misc.py @@ -1,9 +1,9 @@ -import re -import urllib from datetime import datetime from hashlib import md5 from io import BytesIO import random +import re +import urllib import discord import requests @@ -344,16 +344,16 @@ class Misc(commands.Cog): ---------- interaction (discord.Interaction): Slash command context object """ - + links = [ - "https://cdn.discordapp.com/attachments/747542544291987597/973603487541772369/leanderbad.png?ex=65f9ab68&is=65e73668&hm=8557b40aeab3b4b1ce70d1649d1a7409ec623dcb7a31eca55847aa22cf22493a&", - "https://cdn.discordapp.com/attachments/747542544291987597/973603305467043850/unknown.png?ex=65f9ab3c&is=65e7363c&hm=8f7f06dd01fdcd9f2f2d6fb0740a1b7986a28277e271229ddb03822a268f0f6a&", - "https://cdn.discordapp.com/attachments/811606213665357824/955206225681875015/73D1B4ED-BD2E-4BCB-9032-67BF9AEAF4B2.jpg?ex=65f7571f&is=65e4e21f&hm=9677e9d8f4ff0a6ac17095e8572e904b7bd2b49134e972201113cc8666e66319&", - "https://cdn.discordapp.com/attachments/811606213665357824/987321261690605618/Snapchat-1438586183.jpg?ex=65f43414&is=65e1bf14&hm=831c0f74dfc5a590a564aa8713c29fe1a759ba9d8aa0febd49d6186b3aeddaed&" + "https://cdn.discordapp.com/attachments/747542544291987597/973603487541772369/leanderbad.png", + "https://cdn.discordapp.com/attachments/747542544291987597/973603305467043850/unknown.png", + "https://cdn.discordapp.com/attachments/811606213665357824/955206225681875015/73D1B4ED-BD2E-4BCB-9032-67BF9AEAF4B2.jpg", + "https://cdn.discordapp.com/attachments/811606213665357824/987321261690605618/Snapchat-1438586183.jpg" ] - + random_link = random.choice(links) - + await interaction.response.send_message(random_link)