diff options
| author | seth <[email protected]> | 2023-01-09 01:06:06 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-01-09 02:07:50 -0500 |
| commit | b0ca5f3393beb1d02f987e3c3f6c11d9f1df85d9 (patch) | |
| tree | d7b14c500b59a7e3db0f48c3f568850a12f8fcbc /src/moyai_bot/bot.py | |
| parent | c6e02dfdb25aa2d172e4ddc26ee681280bc41645 (diff) | |
feat: split messages that are too long
Diffstat (limited to 'src/moyai_bot/bot.py')
| -rw-r--r-- | src/moyai_bot/bot.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/moyai_bot/bot.py b/src/moyai_bot/bot.py index 8ba5ac0..f4b2f25 100644 --- a/src/moyai_bot/bot.py +++ b/src/moyai_bot/bot.py @@ -54,8 +54,13 @@ async def moyaispam(ctx: commands.Context): 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") + 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) +async def copypasta(interaction: discord.Interaction, + choices: app_commands.Choice[str]): + msgs = get_copypasta(choices.value) + for i, msg in enumerate(msgs): + if i == 0: + await interaction.response.send_message(msg) + else: + await interaction.channel.send(msg) |
