-
is it possible to use multiple tokens to send messages to a specific channel at once with a few ms delay in each token? |
Beta Was this translation helpful? Give feedback.
Answered by
rigwild
Jun 29, 2022
Replies: 2 comments 10 replies
-
Here you go. Did not test, but should hopefully works! 😁 {
let tokens = [
'abcdefghijklmnopqrstuvwxyz1',
'abcdefghijklmnopqrstuvwxyz2',
'abcdefghijklmnopqrstuvwxyz3',
'abcdefghijklmnopqrstuvwxyz4',
'abcdefghijklmnopqrstuvwxyz5',
'abcdefghijklmnopqrstuvwxyz6',
'abcdefghijklmnopqrstuvwxyz7',
'abcdefghijklmnopqrstuvwxyz8',
'abcdefghijklmnopqrstuvwxyz9'
]
// Prevent the script from auto-updating the token when sending requests with the client
autoUpdateToken = false
id()
let channelId = cid
for (const token of tokens) {
// Change token
authHeader = token
// Send a message
let sentMessage = await api.sendMessage(channelId, 'Hello!')
await delay(500)
// Edit a message
let editedMessage = await api.editMessage(channelId, sentMessage.id, 'Hello, edited!')
await delay(500)
// Delete a message
// await api.deleteMessage(channelId, editedMessage.id)
await delay(500)
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
toastyy00
-
Thanks sir, it work perfectly 💯. |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here you go. Did not test, but should hopefully works! 😁