Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const discord = require("discord.js");
- const botConfig = require("./botconfig.json");
- const client = new discord.Client();
- client.login(botConfig.token);
- client.on("ready", async () => {
- console.log(`${client.user.username} is online.`);
- client.user.setActivity("Testing", { type: "PLAYING" });
- });
- client.on("message", async message => {
- if(message.author.bot) return;
- if(message.channel.type === "dm") return;
- var prefix = botConfig.prefix;
- var messageArray = message.content.split(" ");
- var command = messageArray[0];
- if (command === `${prefix}hallo`) {
- return message.channel.send("Hallo!!");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement