Skip to content

Can i message in certain channels on certain MULTIPLE servers, automatically repeating on a clock #25

Answered by rigwild
otomegitsune asked this question in Q&A
Discussion options

You must be logged in to vote

Every 15-20 minutes, publish in channels successively. You can do loop = false to stop.

{
  let channelIds = [
    '123454811846377545',
    '123452640322166785',
    '123455417791856651',
    '123455417791856652',
    '123455417791856653'
  ]
  let messages = [
    'hello',
    'hi',
    'wesh',
    'yo',
    'hey',
    'mdr',
    'suce',
    'ntm',
    'fdp',
    'yolo',
    'trop baisé',
    'mange tes morts'
  ]

  var loop = true
  while (loop) {
    for (const channelId of channelIds) {
      // Send a randomly picked message
      let message = messages[Math.floor(Math.random() * messages.length)]
      await api.sendMessage(channelId, message)
      console.log(`Sent message "${me…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
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
2 participants