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 /src/moyai_bot/bot.py | |
| parent | abcda5881361d2e219de025c95c4f8728f5caddd (diff) | |
feat: add copypasta command
Diffstat (limited to 'src/moyai_bot/bot.py')
| -rw-r--r-- | src/moyai_bot/bot.py | 20 |
1 files changed, 19 insertions, 1 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) |
