Hello im new to python and need help. i use visual code studio and trying to make a discord dm bot. this is my script:
import time
# User_ids and header for the account
user_id = [
1204489908668997734,
123456789012345678,
234567890123456789,
# Add more user IDs here
]
header = {'authorization': 'discord-token-imput'}
# Message content
payload = {
'content': 'When the video so fire u gotta pull out the 10x combo out'
}
# Send the same direct message from the same account to multiple users, one after another
for user_id in user_ids:
response = requests.post(f'https://discord.com/channels/@me/{user_id}', json=payload, headers=header)
if response.status_code == 200:
print(f'Direct message sent from account {header} to user {user_id}')
else:
print(f'Failed to send direct message from account {header} to user {user_id}. Error: {response.status_code}')
time.sleep(25)
it says it succesfluly sent, but idk, what is wrong here? Am i dumb or what?
