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

binding #95

Merged
merged 1 commit into from
Nov 18, 2020
Merged

binding #95

merged 1 commit into from
Nov 18, 2020

Conversation

zenril
Copy link
Collaborator

@zenril zenril commented Nov 18, 2020

No description provided.

Comment on lines 76 to +77
const server = world.servers[oldState.guild.id];
server.channelJoined(newState);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exposes channel state change to commands

@@ -1,6 +1,7 @@
{
"dev_ids": ["279935071165743105"],
"token": "yourdiscord.tokenhere",
"neglect_timeout": 3600000,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default 1 hour

Comment on lines +6 to +74
static get command() {
return (this.instance = this.instance || new this());
}

get hidden() {
return true;
}

get order() {
return 99;
}

get command_name() {
return this.constructor.name.toLowerCase();
}

get group() {
return 'misc';
}

get short_help() {
return `${this.command_name}.shorthelp`;
}

get long_help() {
return `${this.command_name}.longhelp`;
}

get sequence() {
return {
message: 0,
token: 0,
};
}

/**
* [execute main command execute function]
*
* @param {*} msg
* @param {*} server
* @param {*} world
*
* @return {[type]} [return description]
*/
execute(details, server, world) {
Common.out('Please implement the execute function');
}

/**
* [listeners register listeners]
*
* @return {[type]} [return description]
*/
get listeners() {
var self = this;
return {
message: self.onMessage || null,
token: self.onToken || null,

userJoinedChannel: self.onUserJoinedChannel || null,

messageDelivered: self.onMessageDelivered || null,
validate: self.onValidate || null,

joinVoice: self.onJoinVoice || null,
leaveVoice: self.onLeaveVoice || null,

follow: self.onFollow || null,
unfollow: self.onUnfollow || null,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto formatting stuff :/

@@ -8,7 +8,7 @@ const Lang = require('lang.js'),
fs = require('fs'),
TextToSpeechService = require('@services/TextToSpeechService');

const TIMEOUT_NEGLECT = 480 * 60 * 1000; // 2 hours
const TIMEOUT_NEGLECT = botStuff.auth.neglect_timeout || 480 * 60 * 1000; // 2 hours
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gg ez

@wootosmash wootosmash merged commit ec4dcdd into betabot Nov 18, 2020
@zenril zenril deleted the feature/bind branch April 10, 2023 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants