Answer the question
In order to leave comments, you need to log in
Discord.py how to find out what message needs to be changed through @bot.event?
I have this code:
import discord, re
from time import *
from function import *
import datetime
import asyncio
from discord.ext import commands
token, bot, p, tag = session()
bot.remove_command('help')
online = 0
@bot.event
async def on_voice_state_update(member, before, after):
global online
if before.channel == None and after.channel != None:
msg = discord.Message(723981384435236925)
online -= 1
await msg.edit(content=f'Голосовой онлайн: {online}')
elif before.channel != None and after.channel == None:
msg = discord.Message(723981384435236925)
online -= 1
await msg.edit(content=f'Голосовой онлайн: {online}')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question