Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Commit

Permalink
we move to slashcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
Adivise committed Dec 3, 2021
1 parent 9290eb1 commit 938fe6e
Show file tree
Hide file tree
Showing 29 changed files with 490 additions and 1,173 deletions.
56 changes: 28 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Watch-Together

![see](https://i.imgur.com/5qeHuGr.jpg)
## Feather
- [x] SlashCommand
- [x] Easy to use
- [x] Have Fun

## Requirements

Expand All @@ -11,11 +12,13 @@ Discord Bot Token **[Guide](https://discordjs.guide/preparations/setting-up-a-bo
## Installation

```
git clone https://github.com/Adivise/Watch-Together
cd Watch-Together
git clone https://github.com/Adivise/Fun-Together
cd Fun-Together
npm install
```
After installation finishes you can use `node .` to start the bot.
- 1. After installation finishes you can use `npm run start` or `node index.js` to start the bot.
- 2. After you run the bot you can use `npm run register` or `node registerSlash.js` to register slashcommand. (on use global (/) not have? please kick bot and invite again!)
- 3. You want yo clearing slashcommand you can use `npm run clear` or `node clearSlash.js` to clearing slashcommand. (same header)

## Configuration

Expand All @@ -24,37 +27,34 @@ Copy or Rename `config.json.example` to `config.json` and fill out the values:
```json
{
"TOKEN": "TOKEN_HERE",
"PREFIX": "!"
"GUILD_ID": "GUILD_ID",
"CLIENT_ID": "BOT_ID"
}
```

## Features & Commands

> Note: The default prefix is '!'
> Note: The bot using slashcommand (/)
🎶 **Watch Commands!**
- youtube (!yt, !youtube)
- youtubedev (!ytdev, !youtubedev)
- /youtube
- /youtubedev

**Games Commands!**
- awkword (!awkword, !aw)
- betrayal (!betrayal, !bt, !by, !bet)
- checker (!checkers, !checker)
- chess (!chess)
- chessdev (!chessdev)
- doodlecrew (!doodlecrew, !dc)
- fishinton (!fishinton, !fishing, !ft)
- letterlite (!letterlite, !letter, !lt)
- poker (!poker)
- spellcast (!spellcast, !sc)
- wordsnack (!wordsnack, !ws)

📑 **Utilities Commands!**
- Help (#help, #h, #halp, #commands)

## Picture
- /awkword
- /betrayal
- /checker
- /chess
- /chessdev
- /doodlecrew
- /fishinton
- /letterlite
- /poker
- /spellcast
- /wordsnack
- /puttparty

## Screenshots

![see](https://i.imgur.com/lIysU6A.png)
![see](https://i.imgur.com/c2vFUyI.png)

thx for handler [Tomato6966](https://github.com/Tomato6966)
22 changes: 22 additions & 0 deletions clearSlash.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const { REST } = require("@discordjs/rest");
const { Routes } = require("discord-api-types/v9");
const { CLIENT_ID, GUILD_ID, TOKEN } = require("./config.json");

const commands = [];

const rest = new REST({ version: "9" }).setToken(TOKEN);

(async () => {
try {
console.log("[INFOMATION] Start clearing application (/) commands.");
await rest.put(
// if you want to use global clear slashcommand use here => "Routes.applicationCommands(CLIENT_ID)"
Routes.applicationGuildCommands(CLIENT_ID, GUILD_ID),
// Routes.applicationCommands(CLIENT_ID),
{ body: commands },
);
console.log("[INFOMATION] Successfully clearing application (/) commands.");
} catch (error) {
console.log(error);
}
})();
32 changes: 19 additions & 13 deletions commands/Games/awkword.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
const { MessageEmbed } = require("discord.js");
const { MessageEmbed, MessageActionRow, MessageButton } = require("discord.js");

module.exports = {
name: "awkword",
category: "Games",
aliases: ["aw"],
cooldown: 3,
description: "play awkword with friend!",
botPerms: ["SEND_MESSAGES", "CREATE_INSTANT_INVITE", "EMBED_LINKS"],
run: async (interaction, client) => {
await interaction.deferReply({ ephemeral: false });

run: async (client, message, args) => {
const msg = await message.channel.send("Generating...");

if(message.member.voice.channel) {
client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'awkword').then(async invite => {
if(!interaction.member.voice.channel) return interaction.editReply('You must be in a voice channel to use this command!'); {
client.together.createTogetherCode(interaction.member.voice.channel.id, 'awkword').then(async invite => {

const embed = new MessageEmbed()
.setTitle("Awkword")
.setAuthor("Awkword", client.user.displayAvatarURL())
.setColor("#000001")
.setDescription(`**[CLICK HERE!](${invite.code})**\n\`\`\`\nNote: This feature is not availble for mobile users!\`\`\``)
.setFooter(`Requested by: ${message.author.tag}`, message.author.displayAvatarURL())
.setDescription(`\`\`\`\nNote: This feature is not availble for mobile users!\`\`\``)
.setFooter(`Requested By: ${interaction.user.tag}`, interaction.user.displayAvatarURL())

const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setLabel('Click Here')
.setURL(`${invite.code}`)
.setStyle('LINK')
.setEmoji('🔗')
)

msg.edit({ content: " ", embeds: [embed] });
interaction.editReply({ embeds: [embed], components: [row] });
});
};
}
Expand Down
32 changes: 19 additions & 13 deletions commands/Games/betrayal.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
const { MessageEmbed } = require("discord.js");
const { MessageEmbed, MessageActionRow, MessageButton } = require("discord.js");

module.exports = {
name: "betrayal",
category: "Games",
aliases: ["bty", "bt", "by", "bet"],
cooldown: 3,
description: "play betrayal with friend!",
botPerms: ["SEND_MESSAGES", "CREATE_INSTANT_INVITE", "EMBED_LINKS"],
run: async (interaction, client) => {
await interaction.deferReply({ ephemeral: false });

run: async (client, message, args) => {
const msg = await message.channel.send("Generating...");

if(message.member.voice.channel) {
client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'betrayal').then(async invite => {
if(!interaction.member.voice.channel) return interaction.editReply('You must be in a voice channel to use this command!'); {
client.together.createTogetherCode(interaction.member.voice.channel.id, 'betrayal').then(async invite => {

const embed = new MessageEmbed()
.setTitle("Betrayal")
.setAuthor("Betrayal", client.user.displayAvatarURL())
.setColor("#000001")
.setDescription(`**[CLICK HERE!](${invite.code})**\n\`\`\`\nNote: This feature is not availble for mobile users!\`\`\``)
.setFooter(`Requested by: ${message.author.tag}`, message.author.displayAvatarURL())
.setDescription(`\`\`\`\nNote: This feature is not availble for mobile users!\`\`\``)
.setFooter(`Requested By: ${interaction.user.tag}`, interaction.user.displayAvatarURL())

const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setLabel('Click Here')
.setURL(`${invite.code}`)
.setStyle('LINK')
.setEmoji('🔗')
)

msg.edit({ content: " ", embeds: [embed] });
interaction.editReply({ embeds: [embed], components: [row] });
});
};
}
Expand Down
32 changes: 19 additions & 13 deletions commands/Games/checker.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
const { MessageEmbed } = require("discord.js");
const { MessageEmbed, MessageActionRow, MessageButton } = require("discord.js");

module.exports = {
name: "checkers",
category: "Games",
aliases: ["checker"],
cooldown: 3,
description: "play checkers with friend!",
botPerms: ["SEND_MESSAGES", "CREATE_INSTANT_INVITE", "EMBED_LINKS"],
run: async (interaction, client) => {
await interaction.deferReply({ ephemeral: false });

run: async (client, message, args) => {
const msg = await message.channel.send("Generating...");

if(message.member.voice.channel) {
client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'checkers').then(async invite => {
if(!interaction.member.voice.channel) return interaction.editReply('You must be in a voice channel to use this command!'); {
client.together.createTogetherCode(interaction.member.voice.channel.id, 'checkers').then(async invite => {

const embed = new MessageEmbed()
.setTitle("Checkers")
.setAuthor("Checker", client.user.displayAvatarURL())
.setColor("#000001")
.setDescription(`**[CLICK HERE!](${invite.code})**\n\`\`\`\nNote: This feature is not availble for mobile users!\`\`\``)
.setFooter(`Requested by: ${message.author.tag}`, message.author.displayAvatarURL())
.setDescription(`\`\`\`\nNote: This feature is not availble for mobile users!\`\`\``)
.setFooter(`Requested By: ${interaction.user.tag}`, interaction.user.displayAvatarURL())

const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setLabel('Click Here')
.setURL(`${invite.code}`)
.setStyle('LINK')
.setEmoji('🔗')
)

msg.edit({ content: " ", embeds: [embed] });
interaction.editReply({ embeds: [embed], components: [row] });
});
};
}
Expand Down
32 changes: 19 additions & 13 deletions commands/Games/chess.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
const { MessageEmbed } = require("discord.js");
const { MessageEmbed, MessageActionRow, MessageButton } = require("discord.js");

module.exports = {
name: "chess",
category: "Games",
aliases: [],
cooldown: 3,
description: "play chess with friend!",
botPerms: ["SEND_MESSAGES", "CREATE_INSTANT_INVITE", "EMBED_LINKS"],
run: async (interaction, client) => {
await interaction.deferReply({ ephemeral: false });

run: async (client, message, args) => {
const msg = await message.channel.send("Generating...");

if(message.member.voice.channel) {
client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'chess').then(async invite => {
if(!interaction.member.voice.channel) return interaction.editReply('You must be in a voice channel to use this command!'); {
client.together.createTogetherCode(interaction.member.voice.channel.id, 'chess').then(async invite => {

const embed = new MessageEmbed()
.setTitle("Chess")
.setAuthor("Chess", client.user.displayAvatarURL())
.setColor("#000001")
.setDescription(`**[CLICK HERE!](${invite.code})**\n\`\`\`\nNote: This feature is not availble for mobile users!\`\`\``)
.setFooter(`Requested by: ${message.author.tag}`, message.author.displayAvatarURL())
.setDescription(`\`\`\`\nNote: This feature is not availble for mobile users!\`\`\``)
.setFooter(`Requested By: ${interaction.user.tag}`, interaction.user.displayAvatarURL())

const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setLabel('Click Here')
.setURL(`${invite.code}`)
.setStyle('LINK')
.setEmoji('🔗')
)

msg.edit({ content: " ", embeds: [embed] });
interaction.editReply({ embeds: [embed], components: [row] });
});
};
}
Expand Down
32 changes: 19 additions & 13 deletions commands/Games/chessdev.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
const { MessageEmbed } = require("discord.js");
const { MessageEmbed, MessageActionRow, MessageButton } = require("discord.js");

module.exports = {
name: "chessdev",
category: "Games",
aliases: [],
cooldown: 3,
description: "play chess version development with friend!",
botPerms: ["SEND_MESSAGES", "CREATE_INSTANT_INVITE", "EMBED_LINKS"],
run: async (interaction, client) => {
await interaction.deferReply({ ephemeral: false });

run: async (client, message, args) => {
const msg = await message.channel.send("Generating...");

if(message.member.voice.channel) {
client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'chessDev').then(async invite => {
if(!interaction.member.voice.channel) return interaction.editReply('You must be in a voice channel to use this command!'); {
client.together.createTogetherCode(interaction.member.voice.channel.id, 'chessDev').then(async invite => {

const embed = new MessageEmbed()
.setTitle("Chess Development")
.setAuthor("Chess Development", client.user.displayAvatarURL())
.setColor("#000001")
.setDescription(`**[CLICK HERE!](${invite.code})**\n\`\`\`\nNote: This feature is not availble for mobile users!\`\`\``)
.setFooter(`Requested by: ${message.author.tag}`, message.author.displayAvatarURL())
.setDescription(`\`\`\`\nNote: This feature is not availble for mobile users!\`\`\``)
.setFooter(`Requested By: ${interaction.user.tag}`, interaction.user.displayAvatarURL())

const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setLabel('Click Here')
.setURL(`${invite.code}`)
.setStyle('LINK')
.setEmoji('🔗')
)

msg.edit({ content: " ", embeds: [embed] });
interaction.editReply({ embeds: [embed], components: [row] });
});
};
}
Expand Down
32 changes: 19 additions & 13 deletions commands/Games/doodlecrew.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
const { MessageEmbed } = require("discord.js");
const { MessageEmbed, MessageActionRow, MessageButton } = require("discord.js");

module.exports = {
name: "doodlecrew",
category: "Games",
aliases: ["dc"],
cooldown: 3,
description: "play doodlecrew with friend!",
botPerms: ["SEND_MESSAGES", "CREATE_INSTANT_INVITE", "EMBED_LINKS"],
run: async (interaction, client) => {
await interaction.deferReply({ ephemeral: false });

run: async (client, message, args) => {
const msg = await message.channel.send("Generating...");

if(message.member.voice.channel) {
client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'doodlecrew').then(async invite => {
if(!interaction.member.voice.channel) return interaction.editReply('You must be in a voice channel to use this command!'); {
client.together.createTogetherCode(interaction.member.voice.channel.id, 'doodlecrew').then(async invite => {

const embed = new MessageEmbed()
.setTitle("Doodle Crew")
.setAuthor("Doodle Crew", client.user.displayAvatarURL())
.setColor("#000001")
.setDescription(`**[CLICK HERE!](${invite.code})**\n\`\`\`\nNote: This feature is not availble for mobile users!\`\`\``)
.setFooter(`Requested by: ${message.author.tag}`, message.author.displayAvatarURL())
.setDescription(`\`\`\`\nNote: This feature is not availble for mobile users!\`\`\``)
.setFooter(`Requested By: ${interaction.user.tag}`, interaction.user.displayAvatarURL())

const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setLabel('Click Here')
.setURL(`${invite.code}`)
.setStyle('LINK')
.setEmoji('🔗')
)

msg.edit({ content: " ", embeds: [embed] });
interaction.editReply({ embeds: [embed], components: [row] });
});
};
}
Expand Down
Loading

0 comments on commit 938fe6e

Please sign in to comment.