Skip to content

Commit

Permalink
2023 Refactor and Update (#138)
Browse files Browse the repository at this point in the history
* refactor for 2023

* added requirements

---------

Co-authored-by: tyffical <>
  • Loading branch information
mcao authored Dec 15, 2023
1 parent dec0b46 commit 8f814d0
Show file tree
Hide file tree
Showing 27 changed files with 266 additions and 1,181 deletions.
2 changes: 0 additions & 2 deletions .replit

This file was deleted.

7 changes: 0 additions & 7 deletions CODE_OF_CONDUCT.md

This file was deleted.

98 changes: 0 additions & 98 deletions cogs/fun.py

This file was deleted.

72 changes: 0 additions & 72 deletions cogs/gifts.py

This file was deleted.

44 changes: 0 additions & 44 deletions cogs/utils.py

This file was deleted.

66 changes: 0 additions & 66 deletions data/emojis.py

This file was deleted.

3 changes: 0 additions & 3 deletions data/ids.py

This file was deleted.

66 changes: 66 additions & 0 deletions fun.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import discord
from discord import option
from discord.ext import commands


class Fun(commands.Cog):

def __init__(self, bot):
self.bot = bot

@commands.slash_command(name="hug",
description="everyone needs a hug once in a while <3"
)
@option("recipient",
discord.User,
description="Whom do you want to hug?",
required=False)
@option("reason", description="Why do you want to hug them?", required=False)
async def hug(self, ctx: discord.ApplicationContext,
recipient: discord.Member, reason: str):
mention = recipient.id if recipient else None
if not reason:
reason = "no reason, you simply deserve it. yeet"
if not mention:
await ctx.send_response(content="Who do you want to hug?")
elif mention == ctx.author.id:
await ctx.send_response(
content=
"Does someone need a hug? [*source* <https://www.youtube.com/watch?v=TIMj0s5dvpA>]"
)
else:
await ctx.send_response(
"<@{mention}> Everbody needs a hug. It changes your metabolism:\n Reason: {reason}"
.format(mention=mention, reason=reason),
file=discord.File('images/hug.gif')
) # change this back to the right gif at some point

@commands.slash_command(name="yeet",
description="yeet someone... you know you want to")
@option("recipient",
discord.User,
description="Who do you want to yeet?",
required=False)
@option("reason",
description="Why do you want to yeet them?",
required=False)
async def yeet(self, ctx: discord.ApplicationContext,
recipient: discord.Member, reason: str):
mention = recipient.id if recipient else None
myid = ctx.author.id
if not reason:
reason = "'Not every yeet has a reason' - Blahajamin Franklin"
if not mention:
await ctx.send_response(content="Okay, but who do you want to yeet?")
elif mention == myid:
await ctx.send_response(
content="You yeet yourself. Congratulations, you played yourself...")
else:
await ctx.send_response(
"<@{mention}> ya been yeeted, friendo! Enjoy the flight!\n Reason: {reason}"
.format(mention=mention, reason=reason),
file=discord.File('./images/yeet-rafiki.gif'))


def setup(bot):
bot.add_cog(Fun(bot))
4 changes: 4 additions & 0 deletions guilds.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"blahajgang": 825807863146479657,
"tyfficult": 869022453903548456
}
Binary file removed images/WHEREISMYBLAHAJ.png
Binary file not shown.
Binary file modified images/flags/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/flags/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/flags/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/flags/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/flags/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/giftBlahaj.png
Binary file not shown.
Loading

0 comments on commit 8f814d0

Please sign in to comment.