Skip to content

Nickname changer #34

Answered by DeadLyBro
toastyy00 asked this question in Q&A
Aug 30, 2022 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

This should be work, edit nicks.

{
    id()
    const nick = ['Nick1', 'Nick2', 'Nick3']
    const guildId = gid
    var loop = true
    let nickIndex = 0
    let count = 0
    while (loop) {
        await api.changeNick(guildId, nick[nickIndex])
	console.log(`Nick changed ${++count} times.`)
        nickIndex = (nickIndex + 1) % nick.length
        await api.delay(10 * 1000)  // Wait 10 second, 1000 is equal to one second
    }
}

To stop write console;

loop = false

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@DeadLyBro
Comment options

@rigwild
Comment options

@DeadLyBro
Comment options

@toastyy00
Comment options

Answer selected by rigwild
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants