Basic Interaction Test

This commit is contained in:
2023-03-15 23:45:03 -04:00
parent cc18438573
commit 60174e78b8

View File

@@ -1,6 +1,7 @@
import nextcord as nc import nextcord as nc
from nextcord.ext import commands from nextcord.ext import commands
from typing import Optional from typing import Optional
import asyncio
import os import os
bot = commands.Bot() bot = commands.Bot()
@@ -15,6 +16,11 @@ async def summarize(
article: str, article: str,
part: Optional[str] = nc.SlashOption(required=False) part: Optional[str] = nc.SlashOption(required=False)
): ):
await interaction.response.defer(False, True)
await asyncio.sleep(5)
await interaction.followup.send(f"I'll summarize {article} for you {interaction.user}")
print("Will summarize article.") print("Will summarize article.")
def main(): def main():