Skip to content

Commit

Permalink
Create index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ljdj authored Jan 27, 2019
1 parent e06492d commit b5458a9
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
const Discord = require('discord.js');
const bot = new Discord.Client();

var prefix = ("*")

bot.on('ready', function () {
bot.user.setActivity("Command: *help");
console.log("Connected");
});

bot.login(proces.env.TOKEN);


bot.on('message', message => {
if (message.content === prefix + "help") {
message.channel.send("Liste des commandes: \n *burgerbot \n *fabriquant \n *embed");
console.log("Commande help effectué")
}

if (message.content === prefix + "burgerbot") {
message.reply("Création du bot le _27/01/2018_ à _ 23h00_");
console.log("Commande burgerbot effectué");
}

if (message.content === prefix + "fabriquant") {
message.reply("_Ce bot a été crée par Kingsman_");
console.log("Commande fabriquant effectué");
}

if (message.content === prefix + "embed") {
var embed = new Discord.RichEmbed()
.setTitle("Embed")
.setDescription("Ceci est un embed")
.addField("*help", "Page d'aide", true)
.addField("Embed01", "Embed 01 ! :) Suivez les tuto de [PZH CODAGE](https://pzhcodage.webnode.fr)", true)
.setColor("0xFF8000")
.setFooter("Bon moment parmis nous ! :)")
message.channel.send(embed);
console.log("Commande embed effectué");
}
});

0 comments on commit b5458a9

Please sign in to comment.