Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require("discord.js");
- const client = new Discord.Client();
- const prefix = "PREFIX HERE"
- const activities_list = [
- "t",
- "te",
- "tes",
- "test"
- ];
- client.on("ready", () =>{
- })
- client.on("message", message =>{
- if (message.author.id !== 'ID HERE') return;
- const args = message.content.slice(prefix.length).trim().split(/ +/g);
- const command = args.shift().toLowerCase();
- var seperator = " ";
- var params = message.content.split(seperator).slice(1);
- if (command === `cmd`) {
- message.delete()
- message.channel.send("", { embed: new Discord.RichEmbed().setTitle("**Void**").setColor("#000000").setDescription("\n \n \n**USER COMMANDS**\n \nUser -- Cycles username\nNick -- Changes nickname\nAvatar -- Grabs avatar of user\n \n**STATUS COMMANDS**\n \nStream -- Streams status\nListening -- Listening status\nWatching -- Watching status\nPlaying -- Playing status\n \n**TEXT COMMANDS**\n \nEmbed -- Embeds message\nInvite -- Discord invite\nPurge -- Purges messages\n").setTimestamp() })
- }
- if (command === `stream`) {
- const sayMessage = args.join(" ");
- if (!sayMessage) return;
- client.user.setPresence({
- game: {
- name: `${sayMessage}`,
- type: `Streaming`,
- url: "https://www.twitch.tv/999"
- }
- });
- message.delete().catch(dash => { });
- }
- if (command == 'listening') {
- message.delete().catch(dash => { });
- const sayMessage = args.join(" ");
- if (!sayMessage) return;
- client.user.setActivity(`${sayMessage}`, { type: 'LISTENING' })
- }
- if (command == 'nick') {
- message.delete().catch(dash => { });
- const sayMessage = args.join(" ");
- if (!sayMessage) return;
- message.guild.members.get(client.user.id).setNickname(`${sayMessage}`);
- }
- if (command == 'watching') {
- message.delete().catch(dash => { });
- const sayMessage = args.join(" ");
- if (!sayMessage) return;
- client.user.setActivity(`${sayMessage}`, { type: 'WATCHING'})
- }
- if (command == 'playing') {
- message.delete().catch(dash => { });
- const sayMessage = args.join(" ");
- if (!sayMessage) return;
- client.user.setActivity(`${sayMessage}`, { type: 'PLAYING'})
- }
- if (command === `user`) {
- message.delete().catch(dash => { });
- var interval = setInterval(function () {
- message.member.setNickname(`m`);
- message.member.setNickname(`ma`);
- message.member.setNickname(`mat`);
- message.member.setNickname(`matt`);
- }, 10);
- }
- if (command === `avatar`) {
- var member = message.mentions.users.first();
- if (!member) return;
- message.delete()
- message.send("", { embed: new Discord.RichEmbed().setColor("#000000").setDescription("URL : " + member.avatarURL).setImage(member.avatarURL) })
- }
- if (command == 'invite') {
- message.delete().catch(dash => { });
- message.channel.send({embed: {
- color: 0000000
- ,
- title: "join my discord!",
- url: "https://discord.gg/Aw9mc4",
- }});
- }
- if (command == 'embed') {
- message.delete().catch(dash => { });
- const sayMessage = args.join(" ");
- if (!sayMessage) return;
- message.channel.send({embed: {
- color: 16761035,
- description: `${sayMessage}`
- }});
- }
- if (command === `purge`) {
- var messagecount = 100;
- if (params.length > 0) {
- messagecount = parseInt(params[0]);
- }
- message.channel.fetchMessages({ limit: 100 }).then(function (messages) {
- var messageArray = messages.array();
- messageArray = messageArray.filter(function (m) { return m.author.id === client.user.id; });
- messageArray.length = messagecount + 1;
- messageArray.map(function (m) { m.delete().catch(console.error); });
- });
- }
- })
- client.login("TOKEN HERE")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement