Skip to content

Commit

Permalink
🚀 v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RemyK888 authored Sep 26, 2021
1 parent 315f40b commit 97b7e88
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 9 deletions.
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ $ npm install discord.js@latest
- Multiple server
- Discord support
- Lightweight
- 10+ games available

### <u>Documentation ➩ coming soon !</u>

Expand All @@ -43,7 +44,7 @@ client.discordTogether = new DiscordTogether(client);
client.on('messageCreate', async message => { // 'message' for Discord.js v12
if (message.content === 'start') {
if(message.member.voice.channel) {
client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'poker').then(async invite => {
client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'doodlecrew').then(async invite => {
return message.channel.send(`${invite.code}`);
});
};
Expand Down Expand Up @@ -85,16 +86,30 @@ client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'betr
});
```

- Fishing
- Fishington
```js
client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'fishing').then(async invite => {
return message.channel.send(`${invite.code}`);
});
```

- Custom application ID
- Letter Tile
```js
client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'application ID').then(async invite => {
client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'lettertile').then(async invite => {
return message.channel.send(`${invite.code}`);
});
```

- Words Snack
```js
client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'wordsnack').then(async invite => {
return message.channel.send(`${invite.code}`);
});
```

- Doodle Crew
```js
client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'doodlecrew').then(async invite => {
return message.channel.send(`${invite.code}`);
});
```
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "discord-together",
"version": "1.2.0",
"description": "Play games or watch YouTube videos together on Discord !",
"version": "1.3.0",
"description": "Play games or watch YouTube videos together on Discord! More than 10 games available!",
"main": "index.js",
"types": "./types/index.d.ts",
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions src/DiscordTogether.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const defaultApplications = {
fishing: '814288819477020702',
chess: '832012774040141894', // Note : First package to offer chess, any other package offering it will be clearly inspired by it
chessdev: '832012586023256104', // Note : First package to offer chessDev, any other package offering it will be clearly inspired by it
lettertile: '879863686565621790',
wordsnack: '879863976006127627',
doodlecrew: '878067389634314250',
};

/**
Expand Down
8 changes: 7 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ declare class DiscordTogether<T extends {
fishing: string;
chess: string;
chessdev: string;
lettertile: string;
wordsnack: string;
doodlecrew: string;
} & T;
/**
* Create a Youtube Together invite code (note: send the invite using markdown link)
Expand All @@ -45,7 +48,7 @@ declare class DiscordTogether<T extends {
* @example
* client.on('message', async message => {
* if (message.content === 'start') {
* client.discordTogether.createTogetherCode(message.member.voice.channelID, 'youtube').then(async invite => {
* client.discordTogether.createTogetherCode(message.member.voice.channelID, 'doodlecrew').then(async invite => {
* return message.channel.send(`${invite.code}`); // Click the blue link
* });
* };
Expand All @@ -60,6 +63,9 @@ declare class DiscordTogether<T extends {
fishing: string;
chess: string;
chessdev: string;
lettertile: string;
wordsnack: string;
doodlecrew: string;
} & T)): Promise<{
code: string;
}>;
Expand Down

0 comments on commit 97b7e88

Please sign in to comment.