Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ping discord with autocode

// ping = latecy ?


let latency = new Date() - new Date(context.params.event.received_at);
await lib.discord.channels['@0.2.0'].messages.create({
  channel_id: context.params.event.channel_id,
  content: `Pong!
Bot simple was repeat <@!${context.params.event.member.user.id}> with latecy: ${latency}ms `, 
});
 
PREVIOUS NEXT
Tagged: #ping #discord #autocode
ADD COMMENT
Topic
Name
3+4 =