Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update DiscordToGether.js #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 47 additions & 3 deletions mods/DiscordToGether.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
name: "DiscordToGether",
author: ["aoe#9214"],
version: "0.0.1",
changelog: "Added DiscordToGether Mod ~ aoe#9214",
version: "0.0.2",
changelog: "Added DiscordToGether Mod ~ aoe#9214 updated by ~ cedrou#0881",
isEvent: false,
isResponse: true,
isMod: true,
Expand All @@ -16,13 +16,17 @@ module.exports = {
<option value="youtube">Youtube</option>
<option value="poker">Poker</option>
<option value="chess">Chess</option>
<option value="checkersinthepark">Checkers in the Park</option>
<option value="betrayal">Betrayal</option>
<option value="fishing">Fishington</option>
<option value="lettertile">Letter Tile</option>
<option value="wordsnack">Word Snack</option>
<option value="doodlecrew">Doodle Crew</option>
<option value="spellcast">SpellCast</option>
<option value="awkword">Awkword</option>
<option value="puttparty">Puttparty</option>
<option value="sketchheads">Sketchheads</option>
<option value="ocho">Ocho</option>
</select><br>
</div>
</div>
Expand All @@ -38,7 +42,7 @@ module.exports = {
if (!DBS.BetterMods) return console.log(`\x1b[36m [${this.name}.JS] \x1b[0m\x1b[31mBetterMods.js is not loaded. BetterMods.js is required to use this mod. \x1b[0m`);

DBS.BetterMods.requireModule("discord-together");
console.log("Loaded DiscordToGether Mod ~ aoe#9214");
console.log("Loaded DiscordToGether Mod ~ aoe#9214 updated by ~ cedrou#0881");
},
mod: async function (DBS, message, action, args, command, index) {
if (!DBS.BetterMods) return console.log(`\x1b[36m [${this.name}.JS] \x1b[0m\x1b[31mBetterMods.js is not loaded. BetterMods.js is required to use this mod. \x1b[0m`);
Expand Down Expand Up @@ -77,6 +81,16 @@ module.exports = {
});
DBS.callNextAction(command, message, args, index + 1);
break;
case "checkersinthepark":
discordTogether
.createTogetherCode(message.member.voice.channel.id, "checkers")
.then(async (invite) => {
var invitemsg = action.msg;
invitemsg = invitemsg.replace("$$invite.code$$", invite.code);
return message.channel.send(invitemsg);
});
DBS.callNextAction(command, message, args, index + 1);
break;
case "betrayal":
discordTogether
.createTogetherCode(message.member.voice.channel.id, "betrayal")
Expand Down Expand Up @@ -147,6 +161,36 @@ module.exports = {
});
DBS.callNextAction(command, message, args, index + 1);
break;
case "puttparty":
discordTogether
.createTogetherCode(message.member.voice.channel.id, "puttparty")
.then(async (invite) => {
var invitemsg = action.msg;
invitemsg = invitemsg.replace("$$invite.code$$", invite.code);
return message.channel.send(invitemsg);
});
DBS.callNextAction(command, message, args, index + 1);
break;
case "sketchheads":
discordTogether
.createTogetherCode(message.member.voice.channel.id, "sketchheads")
.then(async (invite) => {
var invitemsg = action.msg;
invitemsg = invitemsg.replace("$$invite.code$$", invite.code);
return message.channel.send(invitemsg);
});
DBS.callNextAction(command, message, args, index + 1);
break;
case "ocho":
discordTogether
.createTogetherCode(message.member.voice.channel.id, "ocho")
.then(async (invite) => {
var invitemsg = action.msg;
invitemsg = invitemsg.replace("$$invite.code$$", invite.code);
return message.channel.send(invitemsg);
});
DBS.callNextAction(command, message, args, index + 1);
break;
}
}
DBS.callNextAction(command, message, args, index + 1);
Expand Down