From ccfb67b7be75bfe7af31c1d5e55340fe21dc1975 Mon Sep 17 00:00:00 2001 From: Florian SYLVAIN Date: Thu, 4 Feb 2021 20:00:17 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20-=20The=20bot=20now=20show=20what?= =?UTF-8?q?=20twitch=20chat=20he=20is=20listening=20to=20in=20his=20activi?= =?UTF-8?q?ty=20status.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index f11ba30..7b93cfd 100644 --- a/main.py +++ b/main.py @@ -111,6 +111,7 @@ async def chat_set(ctx, arg1, argF=None): test = chat_init(arg1) if type(test) is int and test == 1: await ctx.send(f'```Connection à la chaine {arg1} réussie !```') + await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name=f"le chat de {arg1}.")) TASK = bot.loop.create_task(twitch(ctx)) else: await ctx.send(test) @@ -131,6 +132,7 @@ async def chat_stop(ctx): SOCK.shutdown(1) SOCK.close() SOCK = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + await bot.change_presence(activity=None) await ctx.send('```Le chat a été arrêté !```') bot.run(token_bot) \ No newline at end of file