Skip to content

Commit

Permalink
feat: Add back the amogus command
Browse files Browse the repository at this point in the history
  • Loading branch information
B1ue-Dev committed May 22, 2024
1 parent 6817b9e commit 7bf134d
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/exts/fun/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import logging
import random
import interactions
from interactions.ext.hybrid_commands import (
hybrid_slash_command,
Expand Down Expand Up @@ -268,6 +269,51 @@ async def youtube(
)
await ctx.send(file=img)

@hybrid_slash_command(
name="amogus",
description="Amogus.",
options=[
interactions.SlashCommandOption(
type=interactions.OptionType.USER,
name="user",
description="Targeted user",
required=True,
),
interactions.SlashCommandOption(
type=interactions.OptionType.STRING,
name="text",
description="The custom text you want to set",
required=False,
),
],
dm_permission=False,
)
async def amogus(
self, ctx: HybridContext, user: interactions.Member, text: str = None
) -> None:
"""Amogus."""

await ctx.defer()

if not text:
text = f"""{user.user.username} was {"not" if str(random.choice(["true", "false"])) == "false" else ""} The Impostor"""
url: str = "https://some-random-api.com/premium/amongus"
params: dict = {
"avatar": user.avatar.url
if user.guild_avatar is None
else user.guild_avatar.url,
"username": user.user.username,
"custom": text,
"key": "hello",
}
resp = await get_response(url, params)
img = interactions.File(
file_name="image.gif",
file=resp,
description="Amogus.",
)
await ctx.send(file=img)


def setup(client) -> None:
"""Setup the extension."""
Expand Down

0 comments on commit 7bf134d

Please sign in to comment.