This repository has been archived by the owner on Sep 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae25ed0
commit b728ea6
Showing
48 changed files
with
623 additions
and
156 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
module.exports = { | ||
data: {"name":"Get Guild Data", | ||
"dataName":"", | ||
"storeAs":"", | ||
"guildFrom":"Command Author", | ||
"guild":""}, | ||
|
||
UI: {"compatibleWith":["Any"], | ||
|
||
"text":"Get Guild Data", | ||
|
||
"sepbar":"", | ||
|
||
"btext":"Get Guild Via", | ||
"menuBar":{"choices":["Command Guild", "ID*", "Variable*"], storeAs:"guildFrom", extraField:"guild"}, | ||
|
||
"sepbar1":"", | ||
|
||
"btext0":"Data Name", | ||
"input*":"dataName", | ||
|
||
"sepbar0":"", | ||
|
||
"btext1":"Store As", | ||
"input!":"storeAs", | ||
|
||
"variableSettings":{ | ||
"guild": { | ||
"Variable*": "direct", | ||
"Command Author": "novars" | ||
} | ||
} | ||
}, | ||
subtitle: "Guild: $[guildFrom]$ - Data Name: $[dataName]$ - Store As: $[storeAs]$", | ||
async run(values, message, client, bridge) { | ||
let varTools = require(`../Toolkit/variableTools.js`) | ||
|
||
var storedData = bridge.data.IO.get() | ||
if (values.guildFrom == 'Command Guild') { | ||
guild = message.guild | ||
} | ||
if (values.guildFrom == 'Variable*') { | ||
guild = bridge.variables[varTools.transf(values.guild, bridge.variables)] | ||
} | ||
if (values.guildFrom == 'ID*') { | ||
guild = client.guilds.get(varTools.transf(values.guild, bridge.variables)) | ||
} | ||
|
||
let guildData = undefined; | ||
|
||
try { | ||
guildData = storedData.guilds[guild.id][varTools.transf(values.dataName, bridge.variables)]; | ||
} catch (error) { | ||
guildData = '' | ||
storedData.guilds[guild.id] = {} | ||
bridge.data.IO.write(storedData) | ||
} | ||
|
||
bridge.variables[varTools.transf(values.storeAs, bridge.variables)] = guildData | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.