Skip to content

Instantly share code, notes, and snippets.

@AlexzanderFlores
Created September 10, 2022 16:46
Show Gist options
  • Save AlexzanderFlores/2d6670d2df426ab76244af5ea48507fd to your computer and use it in GitHub Desktop.
Save AlexzanderFlores/2d6670d2df426ab76244af5ea48507fd to your computer and use it in GitHub Desktop.
Basic ping pong message example
// This is written in JS but the handler will still have TS support as expected
// EXMAPLE FILE PATH: (IMPORTANT)
// ./events/messageCreate/event-example.js
module.exports = async (message, instance) => {
// "message" would be replaced with all function arguments for the given event
if (message.content === 'ping') {
message.channel.send('pong')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment