简体   繁体   中英

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?

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:")
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM