2022-01-04 02:18:28 +05:00
|
|
|
const Command = require("../../base/Command.js"),
|
|
|
|
Discord = require("discord.js");
|
|
|
|
|
|
|
|
class Activity extends Command {
|
|
|
|
constructor(client) {
|
|
|
|
super(client, {
|
|
|
|
name: "activity",
|
|
|
|
dirname: __dirname,
|
|
|
|
enabled: true,
|
|
|
|
guildOnly: true,
|
|
|
|
aliases: ["act"],
|
|
|
|
memberPermissions: [],
|
|
|
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
|
|
|
nsfw: false,
|
|
|
|
ownerOnly: false,
|
|
|
|
cooldown: 2000
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
async run(message, args, data) {
|
|
|
|
const voice = message.member.voice.channel;
|
|
|
|
if (!voice) return message.error("music/play:NO_VOICE_CHANNEL");
|
|
|
|
|
|
|
|
const perms = voice.permissionsFor(this.client.user);
|
2022-01-05 00:24:57 +05:00
|
|
|
if (!perms.has(Discord.Permissions.FLAGS.CONNECT) || !perms.has(Discord.Permissions.FLAGS.SPEAK)) return message.error("music/play:VOICE_CHANNEL_CONNECT");
|
2022-01-04 02:18:28 +05:00
|
|
|
|
|
|
|
const activities = ["awkword", "betrayal", "checkers", "chess", "doodlecrew", "fishing", "lettertile", "poker", "spellcast", "wordsnack", "puttparty", "youtube"];
|
|
|
|
const activity = args[0];
|
|
|
|
|
|
|
|
switch (activity) {
|
|
|
|
case "awkword":
|
2022-01-05 00:24:57 +05:00
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "awkword").then(async invite => {
|
2022-01-04 02:18:28 +05:00
|
|
|
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})**`)
|
2022-01-05 00:24:57 +05:00
|
|
|
.setFooter({
|
|
|
|
text: message.translate("general/activity:FOOTER")
|
|
|
|
})
|
2022-01-13 00:26:23 +05:00
|
|
|
.setTimestamp();
|
2022-01-05 00:24:57 +05:00
|
|
|
return message.channel.send({
|
|
|
|
embeds: [embed]
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "betrayal":
|
2022-01-05 00:24:57 +05:00
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "betrayal").then(async invite => {
|
2022-01-04 02:18:28 +05:00
|
|
|
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})**`)
|
2022-01-05 00:24:57 +05:00
|
|
|
.setFooter({
|
|
|
|
text: message.translate("general/activity:FOOTER")
|
|
|
|
})
|
2022-01-13 00:26:23 +05:00
|
|
|
.setTimestamp();
|
2022-01-05 00:24:57 +05:00
|
|
|
return message.channel.send({
|
|
|
|
embeds: [embed]
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "checkers":
|
2022-01-05 00:24:57 +05:00
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "checkers").then(async invite => {
|
2022-01-04 02:18:28 +05:00
|
|
|
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})**`)
|
2022-01-05 00:24:57 +05:00
|
|
|
.setFooter({
|
|
|
|
text: message.translate("general/activity:FOOTER")
|
|
|
|
})
|
2022-01-13 00:26:23 +05:00
|
|
|
.setTimestamp();
|
2022-01-05 00:24:57 +05:00
|
|
|
return message.channel.send({
|
|
|
|
embeds: [embed]
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "chess":
|
2022-01-05 00:24:57 +05:00
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "chess").then(async invite => {
|
2022-01-04 02:18:28 +05:00
|
|
|
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})**`)
|
2022-01-05 00:24:57 +05:00
|
|
|
.setFooter({
|
|
|
|
text: message.translate("general/activity:FOOTER")
|
|
|
|
})
|
2022-01-13 00:26:23 +05:00
|
|
|
.setTimestamp();
|
2022-01-05 00:24:57 +05:00
|
|
|
return message.channel.send({
|
|
|
|
embeds: [embed]
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "doodlecrew":
|
2022-01-05 00:24:57 +05:00
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "doodlecrew").then(async invite => {
|
2022-01-04 02:18:28 +05:00
|
|
|
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})**`)
|
2022-01-05 00:24:57 +05:00
|
|
|
.setFooter({
|
|
|
|
text: message.translate("general/activity:FOOTER")
|
|
|
|
})
|
2022-01-13 00:26:23 +05:00
|
|
|
.setTimestamp();
|
2022-01-05 00:24:57 +05:00
|
|
|
return message.channel.send({
|
|
|
|
embeds: [embed]
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "fishing":
|
2022-01-05 00:24:57 +05:00
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "fishing").then(async invite => {
|
2022-01-04 02:18:28 +05:00
|
|
|
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})**`)
|
2022-01-05 00:24:57 +05:00
|
|
|
.setFooter({
|
|
|
|
text: message.translate("general/activity:FOOTER")
|
|
|
|
})
|
2022-01-13 00:26:23 +05:00
|
|
|
.setTimestamp();
|
2022-01-05 00:24:57 +05:00
|
|
|
return message.channel.send({
|
|
|
|
embeds: [embed]
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "lettertile":
|
2022-01-05 00:24:57 +05:00
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "lettertile").then(async invite => {
|
2022-01-04 02:18:28 +05:00
|
|
|
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})**`)
|
2022-01-05 00:24:57 +05:00
|
|
|
.setFooter({
|
|
|
|
text: message.translate("general/activity:FOOTER")
|
|
|
|
})
|
2022-01-13 00:26:23 +05:00
|
|
|
.setTimestamp();
|
2022-01-05 00:24:57 +05:00
|
|
|
return message.channel.send({
|
|
|
|
embeds: [embed]
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "poker":
|
2022-01-05 00:24:57 +05:00
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "poker").then(async invite => {
|
2022-01-04 02:18:28 +05:00
|
|
|
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})**`)
|
2022-01-05 00:24:57 +05:00
|
|
|
.setFooter({
|
|
|
|
text: message.translate("general/activity:FOOTER")
|
|
|
|
})
|
2022-01-13 00:26:23 +05:00
|
|
|
.setTimestamp();
|
2022-01-05 00:24:57 +05:00
|
|
|
return message.channel.send({
|
|
|
|
embeds: [embed]
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "spellcast":
|
2022-01-05 00:24:57 +05:00
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "spellcast").then(async invite => {
|
2022-01-04 02:18:28 +05:00
|
|
|
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})**`)
|
2022-01-05 00:24:57 +05:00
|
|
|
.setFooter({
|
|
|
|
text: message.translate("general/activity:FOOTER")
|
|
|
|
})
|
2022-01-13 00:26:23 +05:00
|
|
|
.setTimestamp();
|
2022-01-05 00:24:57 +05:00
|
|
|
return message.channel.send({
|
|
|
|
embeds: [embed]
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "wordsnack":
|
2022-01-05 00:24:57 +05:00
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "wordsnack").then(async invite => {
|
2022-01-04 02:18:28 +05:00
|
|
|
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})**`)
|
2022-01-05 00:24:57 +05:00
|
|
|
.setFooter({
|
|
|
|
text: message.translate("general/activity:FOOTER")
|
|
|
|
})
|
2022-01-13 00:26:23 +05:00
|
|
|
.setTimestamp();
|
2022-01-05 00:24:57 +05:00
|
|
|
return message.channel.send({
|
|
|
|
embeds: [embed]
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "puttparty":
|
2022-01-05 00:24:57 +05:00
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "puttparty").then(async invite => {
|
2022-01-04 02:18:28 +05:00
|
|
|
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})**`)
|
2022-01-05 00:24:57 +05:00
|
|
|
.setFooter({
|
|
|
|
text: message.translate("general/activity:FOOTER")
|
|
|
|
})
|
2022-01-13 00:26:23 +05:00
|
|
|
.setTimestamp();
|
2022-01-05 00:24:57 +05:00
|
|
|
return message.channel.send({
|
|
|
|
embeds: [embed]
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "youtube":
|
2022-01-05 00:24:57 +05:00
|
|
|
this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "youtube").then(async invite => {
|
2022-01-04 02:18:28 +05:00
|
|
|
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})**`)
|
2022-01-05 00:24:57 +05:00
|
|
|
.setFooter({
|
|
|
|
text: message.translate("general/activity:FOOTER")
|
|
|
|
})
|
2022-01-13 00:26:23 +05:00
|
|
|
.setTimestamp();
|
2022-01-05 00:24:57 +05:00
|
|
|
return message.channel.send({
|
|
|
|
embeds: [embed]
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
|
2022-01-13 00:26:23 +05:00
|
|
|
default: {
|
2022-01-04 02:18:28 +05:00
|
|
|
const embed = new Discord.MessageEmbed()
|
|
|
|
.setTitle(message.translate("general/activity:TITLE"))
|
|
|
|
.setDescription(activities.join("\n"))
|
|
|
|
.setColor(data.config.embed.color)
|
2022-01-05 00:24:57 +05:00
|
|
|
.setFooter({
|
|
|
|
text: message.translate("general/activity:FOOTER")
|
|
|
|
})
|
2022-01-13 00:26:23 +05:00
|
|
|
.setTimestamp();
|
2022-01-05 00:24:57 +05:00
|
|
|
message.channel.send({
|
|
|
|
embeds: [embed]
|
|
|
|
});
|
2022-01-13 00:26:23 +05:00
|
|
|
}
|
|
|
|
}
|
2022-01-04 02:18:28 +05:00
|
|
|
}
|
2022-01-13 00:26:23 +05:00
|
|
|
}
|
2022-01-04 02:18:28 +05:00
|
|
|
|
|
|
|
module.exports = Activity;
|