2021-12-22 17:32:50 +05:00
|
|
|
const Command = require("../../base/Command.js"),
|
|
|
|
Discord = require("discord.js");
|
|
|
|
|
|
|
|
class Activity extends Command {
|
2021-12-26 19:29:37 +05:00
|
|
|
constructor(client) {
|
2021-12-22 17:32:50 +05:00
|
|
|
super(client, {
|
|
|
|
name: "activity",
|
|
|
|
dirname: __dirname,
|
|
|
|
enabled: true,
|
|
|
|
guildOnly: true,
|
|
|
|
aliases: [],
|
|
|
|
memberPermissions: [],
|
2021-12-26 19:29:37 +05:00
|
|
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
2021-12-22 17:32:50 +05:00
|
|
|
nsfw: false,
|
|
|
|
ownerOnly: false,
|
|
|
|
cooldown: 3000
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-12-26 19:29:37 +05:00
|
|
|
async run(message, args, data) {
|
2021-12-22 17:32:50 +05:00
|
|
|
const voice = message.member.voice.channel;
|
|
|
|
if (!voice) return message.error("music/play:NO_VOICE_CHANNEL");
|
|
|
|
|
|
|
|
const perms = voice.permissionsFor(this.client.user);
|
|
|
|
if (!perms.has("CONNECT") || !perms.has("SPEAK")) return message.error("music/play:VOICE_CHANNEL_CONNECT");
|
2021-12-25 16:27:21 +05:00
|
|
|
|
|
|
|
const activities = ["awkword", "betrayal", "checkers", "chess", "doodlecrew", "fishing", "lettertile", "poker", "spellcast", "wordsnack", "puttparty", "youtube"];
|
2021-12-25 16:40:30 +05:00
|
|
|
const activity = args[0];
|
2021-12-22 17:32:50 +05:00
|
|
|
|
|
|
|
switch (activity) {
|
2021-12-25 16:27:21 +05:00
|
|
|
case "awkword":
|
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelID, "awkword").then(async invite => {
|
|
|
|
const embed = new Discord.MessageEmbed()
|
|
|
|
.setTitle("Awkword")
|
|
|
|
.setColor(data.config.embed.color)
|
|
|
|
.setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Awkword", channel: voice.name })}](${invite.code})**`)
|
|
|
|
.setFooter(message.translate("general/activity:FOOTER"))
|
|
|
|
.setTimestamp()
|
|
|
|
return message.channel.send(embed);
|
|
|
|
});
|
2021-12-26 19:29:37 +05:00
|
|
|
break;
|
2021-12-22 17:32:50 +05:00
|
|
|
|
|
|
|
case "betrayal":
|
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelID, "betrayal").then(async invite => {
|
|
|
|
const embed = new Discord.MessageEmbed()
|
|
|
|
.setTitle("Betrayal.io")
|
|
|
|
.setColor(data.config.embed.color)
|
|
|
|
.setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Betrayal.io", channel: voice.name })}](${invite.code})**`)
|
2021-12-22 17:39:10 +05:00
|
|
|
.setFooter(message.translate("general/activity:FOOTER"))
|
2021-12-22 17:32:50 +05:00
|
|
|
.setTimestamp()
|
|
|
|
return message.channel.send(embed);
|
|
|
|
});
|
2021-12-26 19:29:37 +05:00
|
|
|
break;
|
2021-12-22 17:32:50 +05:00
|
|
|
|
|
|
|
case "checkers":
|
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelID, "checkers").then(async invite => {
|
|
|
|
const embed = new Discord.MessageEmbed()
|
|
|
|
.setTitle("Checkers In The Park")
|
|
|
|
.setColor(data.config.embed.color)
|
|
|
|
.setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Checkers In The Park", channel: voice.name })}](${invite.code})**`)
|
2021-12-22 17:39:10 +05:00
|
|
|
.setFooter(message.translate("general/activity:FOOTER"))
|
2021-12-22 17:32:50 +05:00
|
|
|
.setTimestamp()
|
|
|
|
return message.channel.send(embed);
|
|
|
|
});
|
2021-12-26 19:29:37 +05:00
|
|
|
break;
|
2021-12-22 17:32:50 +05:00
|
|
|
|
|
|
|
case "chess":
|
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelID, "chess").then(async invite => {
|
|
|
|
const embed = new Discord.MessageEmbed()
|
|
|
|
.setTitle("Chess In The Park")
|
|
|
|
.setColor(data.config.embed.color)
|
|
|
|
.setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Chess In The Park", channel: voice.name })}](${invite.code})**`)
|
2021-12-22 17:39:10 +05:00
|
|
|
.setFooter(message.translate("general/activity:FOOTER"))
|
2021-12-22 17:32:50 +05:00
|
|
|
.setTimestamp()
|
|
|
|
return message.channel.send(embed);
|
|
|
|
});
|
2021-12-26 19:29:37 +05:00
|
|
|
break;
|
2021-12-22 17:32:50 +05:00
|
|
|
|
|
|
|
case "doodlecrew":
|
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelID, "doodlecrew").then(async invite => {
|
|
|
|
const embed = new Discord.MessageEmbed()
|
|
|
|
.setTitle("Doodle Crew")
|
|
|
|
.setColor(data.config.embed.color)
|
|
|
|
.setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Doodle Crew", channel: voice.name })}](${invite.code})**`)
|
2021-12-22 17:39:10 +05:00
|
|
|
.setFooter(message.translate("general/activity:FOOTER"))
|
2021-12-22 17:32:50 +05:00
|
|
|
.setTimestamp()
|
|
|
|
return message.channel.send(embed);
|
|
|
|
});
|
2021-12-26 19:29:37 +05:00
|
|
|
break;
|
2021-12-22 17:32:50 +05:00
|
|
|
|
|
|
|
case "fishing":
|
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelID, "fishing").then(async invite => {
|
|
|
|
const embed = new Discord.MessageEmbed()
|
|
|
|
.setTitle("Fishington.io")
|
|
|
|
.setColor(data.config.embed.color)
|
|
|
|
.setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Fishington.io", channel: voice.name })}](${invite.code})**`)
|
2021-12-22 17:39:10 +05:00
|
|
|
.setFooter(message.translate("general/activity:FOOTER"))
|
2021-12-22 17:32:50 +05:00
|
|
|
.setTimestamp()
|
|
|
|
return message.channel.send(embed);
|
|
|
|
});
|
2021-12-26 19:29:37 +05:00
|
|
|
break;
|
2021-12-22 17:32:50 +05:00
|
|
|
|
|
|
|
case "lettertile":
|
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelID, "lettertile").then(async invite => {
|
|
|
|
const embed = new Discord.MessageEmbed()
|
|
|
|
.setTitle("Letter Tile")
|
|
|
|
.setColor(data.config.embed.color)
|
|
|
|
.setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Letter Tile", channel: voice.name })}](${invite.code})**`)
|
2021-12-22 17:39:10 +05:00
|
|
|
.setFooter(message.translate("general/activity:FOOTER"))
|
2021-12-22 17:32:50 +05:00
|
|
|
.setTimestamp()
|
|
|
|
return message.channel.send(embed);
|
|
|
|
});
|
2021-12-26 19:29:37 +05:00
|
|
|
break;
|
2021-12-22 17:32:50 +05:00
|
|
|
|
|
|
|
case "poker":
|
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelID, "poker").then(async invite => {
|
|
|
|
const embed = new Discord.MessageEmbed()
|
|
|
|
.setTitle("Poker Night")
|
|
|
|
.setColor(data.config.embed.color)
|
|
|
|
.setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Poker Night", channel: voice.name })}](${invite.code})**`)
|
2021-12-22 17:39:10 +05:00
|
|
|
.setFooter(message.translate("general/activity:FOOTER"))
|
2021-12-22 17:32:50 +05:00
|
|
|
.setTimestamp()
|
|
|
|
return message.channel.send(embed);
|
|
|
|
});
|
2021-12-26 19:29:37 +05:00
|
|
|
break;
|
2021-12-22 17:32:50 +05:00
|
|
|
|
|
|
|
case "spellcast":
|
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelID, "spellcast").then(async invite => {
|
|
|
|
const embed = new Discord.MessageEmbed()
|
|
|
|
.setTitle("Spell Cast")
|
|
|
|
.setColor(data.config.embed.color)
|
|
|
|
.setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Spell Cast", channel: voice.name })}](${invite.code})**`)
|
2021-12-22 17:39:10 +05:00
|
|
|
.setFooter(message.translate("general/activity:FOOTER"))
|
2021-12-22 17:32:50 +05:00
|
|
|
.setTimestamp()
|
|
|
|
return message.channel.send(embed);
|
|
|
|
});
|
2021-12-26 19:29:37 +05:00
|
|
|
break;
|
2021-12-22 17:32:50 +05:00
|
|
|
|
|
|
|
case "wordsnack":
|
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelID, "wordsnack").then(async invite => {
|
|
|
|
const embed = new Discord.MessageEmbed()
|
|
|
|
.setTitle("Words Snack")
|
|
|
|
.setColor(data.config.embed.color)
|
|
|
|
.setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Words Snack", channel: voice.name })}](${invite.code})**`)
|
2021-12-22 17:39:10 +05:00
|
|
|
.setFooter(message.translate("general/activity:FOOTER"))
|
2021-12-22 17:32:50 +05:00
|
|
|
.setTimestamp()
|
|
|
|
return message.channel.send(embed);
|
|
|
|
});
|
2021-12-26 19:29:37 +05:00
|
|
|
break;
|
2021-12-22 17:32:50 +05:00
|
|
|
|
2021-12-25 16:27:21 +05:00
|
|
|
case "puttparty":
|
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelID, "puttparty").then(async invite => {
|
|
|
|
const embed = new Discord.MessageEmbed()
|
|
|
|
.setTitle("Puttparty")
|
|
|
|
.setColor(data.config.embed.color)
|
|
|
|
.setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Puttparty", channel: voice.name })}](${invite.code})**`)
|
|
|
|
.setFooter(message.translate("general/activity:FOOTER"))
|
|
|
|
.setTimestamp()
|
|
|
|
return message.channel.send(embed);
|
|
|
|
});
|
2021-12-26 19:29:37 +05:00
|
|
|
break;
|
2021-12-25 16:27:21 +05:00
|
|
|
|
2021-12-22 17:32:50 +05:00
|
|
|
case "youtube":
|
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelID, "youtube").then(async invite => {
|
|
|
|
const embed = new Discord.MessageEmbed()
|
|
|
|
.setTitle("Youtube Together")
|
|
|
|
.setColor(data.config.embed.color)
|
|
|
|
.setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Youtube Together", channel: voice.name })}](${invite.code})**`)
|
2021-12-22 17:39:10 +05:00
|
|
|
.setFooter(message.translate("general/activity:FOOTER"))
|
2021-12-22 17:32:50 +05:00
|
|
|
.setTimestamp()
|
|
|
|
return message.channel.send(embed);
|
|
|
|
});
|
2021-12-26 19:29:37 +05:00
|
|
|
break;
|
2021-12-22 17:32:50 +05:00
|
|
|
|
|
|
|
default:
|
|
|
|
const embed = new Discord.MessageEmbed()
|
|
|
|
.setTitle(message.translate("general/activity:TITLE"))
|
|
|
|
.setDescription(activities.join("\n"))
|
|
|
|
.setColor(data.config.embed.color)
|
|
|
|
.setFooter(message.translate("general/activity:FOOTER"))
|
|
|
|
.setTimestamp()
|
2021-12-25 16:45:25 +05:00
|
|
|
message.channel.send(embed);
|
2021-12-26 19:29:37 +05:00
|
|
|
break;
|
2021-12-25 16:27:21 +05:00
|
|
|
};
|
2021-12-22 17:32:50 +05:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Activity;
|