diff --git a/README.md b/README.md index 76c3b5e..97d59eb 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ $ npm install discord.js@latest - Multiple server - Discord support - Lightweight -- 15+ games available +- 18+ games available
@@ -34,15 +34,15 @@ This is a simple example of code using this package. ```js const Discord = require('discord.js'); -const client = new Discord.Client(); +const client = new Discord.Client({ intents: [Discord.Intents.FLAGS.GUILDS, Discord.Intents.FLAGS.GUILD_MESSAGES] }); const { DiscordTogether } = require('discord-together'); client.discordTogether = new DiscordTogether(client); -client.on('messageCreate', async message => { // 'message' for Discord.js v12 +client.on('messageCreate', async message => { if (message.content === 'start') { if(message.member.voice.channel) { - client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'doodlecrew').then(async invite => { + client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'sketchheads').then(async invite => { return message.channel.send(`${invite.code}`); }); }; @@ -139,13 +139,20 @@ client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'putt }); ``` -- Sketch Heads +- Sketchheads ```js client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'sketchheads').then(async invite => { return message.channel.send(`${invite.code}`); }); ``` +- Ocho +```js +client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'ocho').then(async invite => { + return message.channel.send(`${invite.code}`); +}); +``` + # 📷 Image ![Invite link](https://media.discordapp.net/attachments/835896457454026802/837968506846183474/2021-05-01_10h26_17.png) diff --git a/package.json b/package.json index d4edea3..e0cb1ac 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "discord-together", "version": "1.3.3", - "description": "Play games or watch YouTube videos together on Discord! More than 15 games available!", + "description": "Play games or watch YouTube videos together on Discord! More than 18 games available!", "main": "index.js", "types": "./types/index.d.ts", "scripts": { diff --git a/src/DiscordTogether.js b/src/DiscordTogether.js index fae842e..b3fdbb8 100644 --- a/src/DiscordTogether.js +++ b/src/DiscordTogether.js @@ -16,7 +16,8 @@ const defaultApplications = { spellcast: '852509694341283871', // Note : First package to offer spellcast, any other package offering it will be clearly inspired by it checkers: '832013003968348200', // Note : First package to offer checkers, any other package offering it will be clearly inspired by it puttparty: '763133495793942528', // Note : First package to offer puttparty, any other package offering it will be clearly inspired by it - sketchheads: '902271654783242291', + sketchheads: '902271654783242291', // Note : First package to offer sketchheads any other package offering it will be clearly inspired by it + ocho: '832025144389533716', // Note : First package to offer ocho any other package offering it will be clearly inspired by it //sketchyartist: '879864070101172255' // Note : First package to offer sketchyartist, any other package offering it will be clearly inspired by it }; diff --git a/test/test-djs12.js b/test/test-djs12.js new file mode 100644 index 0000000..449c1d4 --- /dev/null +++ b/test/test-djs12.js @@ -0,0 +1,17 @@ +const Discord = require('discord.js'); +const client = new Discord.Client(); +const { DiscordTogether } = require('../index.js'); + +client.discordTogether = new DiscordTogether(client); + +client.on('message', async message => { + if (message.content === 'start') { + if(message.member.voice.channel) { + client.discordTogether.createTogetherCode(message.member.voice.channelId, 'sketchheads').then(async invite => { + return message.channel.send(`${invite.code}`); // Click the blue link ! + }); + }; + }; +}); + +client.login('Discord bot token'); \ No newline at end of file diff --git a/test/test-djs13.js b/test/test-djs13.js new file mode 100644 index 0000000..b548817 --- /dev/null +++ b/test/test-djs13.js @@ -0,0 +1,17 @@ +const Discord = require('discord.js'); +const client = new Discord.Client({ intents: [Discord.Intents.FLAGS.GUILDS, Discord.Intents.FLAGS.GUILD_MESSAGES] }); +const { DiscordTogether } = require('../index.js'); + +client.discordTogether = new DiscordTogether(client); + +client.on('messageCreate', async message => { + if (message.content === 'start') { + if(message.member.voice.channel) { + client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'sketchheads').then(async invite => { + return message.channel.send(`${invite.code}`); // Click the blue link ! + }); + }; + }; +}); + +client.login('Discord bot token'); \ No newline at end of file diff --git a/types/index.d.ts b/types/index.d.ts index 4754248..d21366a 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -16,7 +16,7 @@ declare class DiscordTogether { * if (message.content === 'start') { - * client.discordTogether.createTogetherCode(message.member.voice.channelID, 'youtube').then(async invite => { + * client.discordTogether.createTogetherCode(message.member.voice.channelID, 'skeatchheads').then(async invite => { * return message.channel.send(`${invite.code}`); * }); * }; @@ -45,6 +45,7 @@ declare class DiscordTogether { * if (message.content === 'start') { - * client.discordTogether.createTogetherCode(message.member.voice.channelID, 'spellcast').then(async invite => { + * client.discordTogether.createTogetherCode(message.member.voice.channelID, 'skeatchheads').then(async invite => { * return message.channel.send(`${invite.code}`); // Click the blue link * }); * }; @@ -76,7 +77,8 @@ declare class DiscordTogether; -} +} \ No newline at end of file