- The bot now show what twitch chat he is listening to in his activity status.

This commit is contained in:
Florian SYLVAIN
2021-02-04 20:00:17 +01:00
parent 430b9b31f2
commit ccfb67b7be
+2
View File
@@ -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)