Search code examples
javascriptnode.jsbotsdiscord.jspm2

How would I make a bot that "host events" with Discord.js?


I need a way to host "events" with Discord.js.

The closest I found was this.

This is exactly what I need it to do but this doesn't show any code to try and replicate.

Any suggestions?


Solution

  • I figured out how to do this.

      if(command === 'mnhost') {
    var movie = args.join(" ");
    let MNP = message.guild.roles.find(role => role.name === "Movie Night Pings");
    if (!movie) return message.reply('Please specify the movie you are hosting! (Ex. `~mnhost <Movie Title>`)')
    
    
      message.channel.send(":partying_face: Are you ready for some movies?:partying_face:")
      message.channel.send(MNP + " :movie_camera: " + message.author + " is hosting __**" + movie + "**__!!! :movie_camera:")
    }