Merge branch 'main' into dev

This commit is contained in:
Paillat
2022-12-12 12:58:45 +01:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
When redistributing this code, add your copyrihght notice below all the other ones
Copyright (c) 2022 Jérémie Cotti
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007 Version 3, 29 June 2007

View File

@@ -15,6 +15,7 @@ class Chat (discord.Cog) :
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()
thread = threading.Thread(target=asyncio.run_coroutine_threadsafe, args=(on_message_process(message, self), loop)) thread = threading.Thread(target=asyncio.run_coroutine_threadsafe, args=(on_message_process(message, self), loop))
thread.start() thread.start()
@discord.slash_command(name="say", description="Say a message") @discord.slash_command(name="say", description="Say a message")
async def say(self, ctx: discord.ApplicationContext, message: str): async def say(self, ctx: discord.ApplicationContext, message: str):
debug(f"The user {ctx.author.display_name} ran the say command command in the channel {ctx.channel} of the guild {ctx.guild}, named {ctx.guild.name}") debug(f"The user {ctx.author.display_name} ran the say command command in the channel {ctx.channel} of the guild {ctx.guild}, named {ctx.guild.name}")