0
@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

Iam pro
  • 5
  • 1

1 Answers1

0

Discord Dev Portal

If you do not get any errors when sending a message it's probably because in your bot settings you do not have SERVER MEMBERS INTENT enabled

Once you enabled it in the portal you need to add some code.

Find more info here.

I hope this answer helped you.

Bram
  • 511
  • 1
  • 6
  • 22