@client.event
async def on_message(message):
if message.channel.id == 872448587571789834:
data = message.content.split(" ")
user = re.sub("\D", "", data[0])
user_object = client.get_user(int(user)) or await client.fetch_user(int(user))
user = user_object
await user_object.send("Hey, thanks for up-voting me on top.gg, here take 10,000 coins and a special role as an award ")
#voted = discord.utils.get(message.guild.roles, name=" Voted for Legend Moderation")
await open_account(user_object)
users = await get_bank_data()
users[str(user.id)]["wallet"] += 10000
with open("bank.json", "w") as f:
json.dump(users, f, indent=4)
The code in here it check if there is a message sent in that specific channel and gets its first username so it can dm that user and give him money the whole event is not even working i dont get any errors