Skip to content

Instantly share code, notes, and snippets.

@AsamiKafune
Created November 1, 2023 20:30
Show Gist options
  • Save AsamiKafune/d8c763f0a2969d2e941ae27a4384ea42 to your computer and use it in GitHub Desktop.
Save AsamiKafune/d8c763f0a2969d2e941ae27a4384ea42 to your computer and use it in GitHub Desktop.
const axios = require('axios');
// config
const cooldown = 500
const token = '<your token>'
let idx = -1
setInterval(() => {
const animation = [
"πŸ–€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€",
"πŸ€πŸ–€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€",
"πŸ€πŸ€πŸ–€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€",
"πŸ€πŸ€πŸ€πŸ–€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€",
"πŸ€πŸ€πŸ€πŸ€πŸ–€πŸ€πŸ€πŸ€πŸ€πŸ€",
"πŸ€πŸ€πŸ€πŸ€πŸ€πŸ–€πŸ€πŸ€πŸ€πŸ€",
"πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ–€πŸ€πŸ€πŸ€",
"πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ–€πŸ€πŸ€",
"πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ–€πŸ€",
"πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ€πŸ–€",
]
if (idx < animation.length) idx++
const _data = JSON.stringify({
"custom_status": {
"text": animation[idx]
}
})
axios.request({
method: 'patch',
maxBodyLength: Infinity,
url: 'https://ptb.discordapp.com/api/v9/users/@me/settings',
headers: {
'authorization': token,
'content-type': 'application/json'
},
data: _data
}).then((res) => console.log(new Date().toLocaleString()+" done!"))
.catch((err) => console.log(err))
if (idx >= animation.length - 1) idx = -1
}, cooldown);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment