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

Updated metadata version #6

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion actions/action_anchor_MOD.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module.exports = {
// This will make it so the patch version (0.0.X) is not checked.
//---------------------------------------------------------------------

meta: { version: "2.1.4", preciseCheck: true, author: "DBM Extended", authorUrl: "https://github.com/DBM-Extended/mods", downloadURL: "https://github.com/DBM-Extended/mods/tree/main/actions/end_if_ended.js" },
meta: { version: "2.1.5", preciseCheck: true, author: "DBM Extended", authorUrl: "https://github.com/DBM-Extended/mods", downloadURL: "https://github.com/DBM-Extended/mods/tree/main/actions/end_if_ended.js" },

//---------------------------------------------------------------------
// Action Fields
Expand Down
135 changes: 135 additions & 0 deletions actions/action_anchor_MOD.js.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
module.exports = {
//---------------------------------------------------------------------
// Action Name
//
// This is the name of the action displayed in the editor.
//---------------------------------------------------------------------

name: "Action Anchor",

//---------------------------------------------------------------------
// Action Section
//
// This is the section the action will fall into.
//---------------------------------------------------------------------

section: "Other Stuff",

//---------------------------------------------------------------------
// Action Subtitle
//
// This function generates the subtitle displayed next to the name.
//---------------------------------------------------------------------

subtitle(data, presets) {
return data.description
? `<font color="${data.color}">${data.description}</font>`
: `Create ${
data.anchor_id
? `the "<font color="${data.color}">${data.anchorName}</font>" anchor at the current position!`
: 'an anchor!'
}`;
},

//---------------------------------------------------------------------
// Action Meta Data
//
// Helps check for updates and provides info if a custom mod.
// If this is a third-party mod, please set "author" and "authorUrl".
//
// It's highly recommended "preciseCheck" is set to false for third-party mods.
// This will make it so the patch version (0.0.X) is not checked.
//---------------------------------------------------------------------

meta: { version: "2.1.4", preciseCheck: true, author: "DBM Extended", authorUrl: "https://github.com/DBM-Extended/mods", downloadURL: "https://github.com/DBM-Extended/mods/tree/main/actions/end_if_ended.js" },

//---------------------------------------------------------------------
// Action Fields
//
// These are the fields for the action. These fields are customized
// by creating elements with corresponding IDs in the HTML. These
// are also the names of the fields stored in the action's JSON data.
//---------------------------------------------------------------------

fields: ["anchorName", "color", "description"],

//---------------------------------------------------------------------
// Command HTML
//
// This function returns a string containing the HTML used for
// editing actions.
//
// The "isEvent" parameter will be true if this action is being used
// for an event. Due to their nature, events lack certain information,
// so edit the HTML to reflect this.
//---------------------------------------------------------------------

html(isEvent, data) {
return `
<span class="dbminputlabel">Anchor Name</span><br>
<input id="anchorName" class="round" type="text">
<div style="float: left; width: 24%;">
Anchor Color:<br>
<input type="color" id="color"><br>
</div>
<div>
<div style="float: left; width: 98%;">
Description:<br>
<input type="text" class="round" id="description">
</div>
</div>`;
},

//---------------------------------------------------------------------
// Action Editor Init Code
//
// When the HTML is first applied to the action editor, this code
// is also run. This helps add modifications or setup reactionary
// functions for the DOM elements.
//---------------------------------------------------------------------

init() {},

//---------------------------------------------------------------------
// Action Bot Function
//
// This is the function for the action within the Bot's Action class.
// Keep in mind event calls won't have access to the "msg" parameter,
// so be sure to provide checks for variable existence.
//---------------------------------------------------------------------

action(cache) {
this.callNextAction(cache);
},

//---------------------------------------------------------------------
// Action Bot Mod Init
//
// An optional function for action mods. Upon the bot's initialization,
// each command/event's actions are iterated through. This is to
// initialize responses to interactions created within actions
// (e.g. buttons and select menus for Send Message).
//
// If an action provides inputs for more actions within, be sure
// to call the `this.prepareActions` function to ensure all actions are
// recursively iterated through.
//---------------------------------------------------------------------

modInit(data, customData, index) {
if (!customData.anchors) {
customData.anchors = {};
}
customData.anchors[data.anchorName] = index;
},

//---------------------------------------------------------------------
// Action Bot Mod
//
// Upon initialization of the bot, this code is run. Using the bot's
// DBM namespace, one can add/modify existing functions if necessary.
// In order to reduce conflicts between mods, be sure to alias
// functions you wish to overwrite.
//---------------------------------------------------------------------

mod() {},
};
2 changes: 1 addition & 1 deletion actions/action_container_color_comment_MOD.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = {
//---------------------------------------------------------------------


meta: { version: "2.1.4", preciseCheck: true, author: "DBM Extended", authorUrl: "https://github.com/DBM-Extended/mods", downloadURL: "https://github.com/DBM-Extended/mods/tree/main/actions/action_container_color_comment_MOD.js" },
meta: { version: "2.1.5", preciseCheck: true, author: "DBM Extended", authorUrl: "https://github.com/DBM-Extended/mods", downloadURL: "https://github.com/DBM-Extended/mods/tree/main/actions/action_container_color_comment_MOD.js" },

//---------------------------------------------------------------------
// Action Fields
Expand Down
132 changes: 132 additions & 0 deletions actions/action_container_color_comment_MOD.js.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
module.exports = {
//---------------------------------------------------------------------
// Action Name
//
// This is the name of the action displayed in the editor.
//---------------------------------------------------------------------

name: "Action Container",

//---------------------------------------------------------------------
// Action Section
//
// This is the section the action will fall into.
//---------------------------------------------------------------------

section: "Other Stuff",

//---------------------------------------------------------------------
// Action Subtitle
//
// This function generates the subtitle displayed next to the name.
//---------------------------------------------------------------------

subtitle(data, presets) {
return `<font color="${data.color}">${data.comment}</font>`;
},

//---------------------------------------------------------------------
// Action Meta Data
//
// Helps check for updates and provides info if a custom mod.
// If this is a third-party mod, please set "author" and "authorUrl".
//
// It's highly recommended "preciseCheck" is set to false for third-party mods.
// This will make it so the patch version (0.0.X) is not checked.
//---------------------------------------------------------------------


meta: { version: "2.1.4", preciseCheck: true, author: "DBM Extended", authorUrl: "https://github.com/DBM-Extended/mods", downloadURL: "https://github.com/DBM-Extended/mods/tree/main/actions/action_container_color_comment_MOD.js" },

//---------------------------------------------------------------------
// Action Fields
//
// These are the fields for the action. These fields are customized
// by creating elements with corresponding Ids in the HTML. These
// are also the names of the fields stored in the action's JSON data.
//---------------------------------------------------------------------

fields: ["comment", "actions", "color"],

//---------------------------------------------------------------------
// Command HTML
//
// This function returns a string containing the HTML used for
// editing actions.
//
// The "isEvent" parameter will be true if this action is being used
// for an event. Due to their nature, events lack certain information,
// so edit the HTML to reflect this.
//
// The "data" parameter stores constants for select elements to use.
// Each is an array: index 0 for commands, index 1 for events.
// The names are: sendTargets, members, roles, channels,
// messages, servers, variables
//---------------------------------------------------------------------

html(isEvent, data) {
return `
<div>
Text Color:<br>
<input type="color" id="color" value="#f2f2f2"></div>
Comment<br>
<input id="comment" class="round" type="text">
</div>

<br><br>

<action-list-input id="actions" height="calc(100vh - 345px)"></action-list-input>`;
},

//---------------------------------------------------------------------
// Action Editor Init Code
//
// When the HTML is first applied to the action editor, this code
// is also run. This helps add modifications or setup reactionary
// functions for the DOM elements.
//---------------------------------------------------------------------

init() {},

//---------------------------------------------------------------------
// Action Bot Function
//
// This is the function for the action within the Bot's Action class.
// Keep in mind event calls won't have access to the "msg" parameter,
// so be sure to provide checks for variable existence.
//---------------------------------------------------------------------

action(cache) {
const data = cache.actions[cache.index];
const actions = data.actions;
this.executeSubActionsThenNextAction(actions, cache);
},

//---------------------------------------------------------------------
// Action Bot Mod Init
//
// An optional function for action mods. Upon the bot's initialization,
// each command/event's actions are iterated through. This is to
// initialize responses to interactions created within actions
// (e.g. buttons and select menus for Send Message).
//
// If an action provides inputs for more actions within, be sure
// to call the `this.prepareActions` function to ensure all actions are
// recursively iterated through.
//---------------------------------------------------------------------

modInit(data) {
this.prepareActions(data.actions);
},

//---------------------------------------------------------------------
// Action Bot Mod
//
// Upon initialization of the bot, this code is run. Using the bot's
// DBM namespace, one can add/modify existing functions if necessary.
// In order to reduce conflicts between mods, be sure to alias
// functions you wish to overwrite.
//---------------------------------------------------------------------

mod() {},
};
2 changes: 1 addition & 1 deletion actions/anchor_create_MOD.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
name: 'Create Anchor',
section: 'Other Stuff',

meta: { version: "2.1.4", preciseCheck: true, author: "DBM Extended", authorUrl: "https://github.com/DBM-Extended/mods", downloadURL: "https://github.com/DBM-Extended/mods/tree/main/actions/anchor_create_MOD.js" },
meta: { version: "2.1.5", preciseCheck: true, author: "DBM Extended", authorUrl: "https://github.com/DBM-Extended/mods", downloadURL: "https://github.com/DBM-Extended/mods/tree/main/actions/anchor_create_MOD.js" },

subtitle(data) {
return data.description
Expand Down
96 changes: 96 additions & 0 deletions actions/anchor_create_MOD.js.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
module.exports = {
name: 'Create Anchor',
section: 'Other Stuff',

meta: { version: "2.1.4", preciseCheck: true, author: "DBM Extended", authorUrl: "https://github.com/DBM-Extended/mods", downloadURL: "https://github.com/DBM-Extended/mods/tree/main/actions/anchor_create_MOD.js" },

subtitle(data) {
return data.description
? `<font color="${data.color}">${data.description}</font>`
: `Create ${
data.anchorName
? `the "<font color="${data.color}">${data.anchorName}</font>" anchor at the current position!`
: 'an anchor!'
}`;
},

fields: ['anchorName', 'color', 'description'],

html() {
return `
<div>
<p>
<u>Mod Info:</u><br>
This mod creates an anchor point for you to jump to without<br>
having to edit other jumps or skips.
</p>
</div><br>
<div style="float: left; width: 74%;">
Anchor Name:<br>
<input type="text" class="round" id="anchorName"><br>
</div>
<div style="float: left; width: 24%;">
Anchor Color:<br>
<input type="color" id="color"><br>
</div>
<div>
<div style="float: left; width: 98%;">
Description:<br>
<input type="text" class="round" id="description">
</div>
</div>`;
},

//---------------------------------------------------------------------
// Action Editor Init Code
//
// When the HTML is first applied to the action editor, this code
// is also run. This helps add modifications or setup reactionary
// functions for the DOM elements.
//---------------------------------------------------------------------

init() {},

//---------------------------------------------------------------------
// Action Bot Function
//
// This is the function for the action within the Bot's Action class.
// Keep in mind event calls won't have access to the "msg" parameter,
// so be sure to provide checks for variable existence.
//---------------------------------------------------------------------

action(cache) {
this.callNextAction(cache);
},

//---------------------------------------------------------------------
// Action Bot Mod Init
//
// An optional function for action mods. Upon the bot's initialization,
// each command/event's actions are iterated through. This is to
// initialize responses to interactions created within actions
// (e.g. buttons and select menus for Send Message).
//
// If an action provides inputs for more actions within, be sure
// to call the `this.prepareActions` function to ensure all actions are
// recursively iterated through.
//---------------------------------------------------------------------

modInit(data, customData, index) {
if (!customData.anchors) {
customData.anchors = {};
}
customData.anchors[data.anchorName] = index;
},

//---------------------------------------------------------------------
// Action Bot Mod
//
// Upon initialization of the bot, this code is run. Using the bot's
// DBM namespace, one can add/modify existing functions if necessary.
// In order to reduce conflicts between mods, be sure to alias
// functions you wish to overwrite.
//---------------------------------------------------------------------

mod() {},
};