forked from Galactic/galactic-bot
Observer templates
This commit is contained in:
parent
5658c11cc3
commit
3289923571
@ -1,5 +1,4 @@
|
||||
const { Observer } = require('../../../interfaces/');
|
||||
const Collection = require('../../../../util/Collection.js');
|
||||
|
||||
class ActivityTracker extends Observer {
|
||||
|
||||
@ -7,12 +6,12 @@ class ActivityTracker extends Observer {
|
||||
|
||||
super(client, {
|
||||
name: 'activityTracker',
|
||||
priority: 3,
|
||||
priority: 4,
|
||||
guarded: true
|
||||
});
|
||||
|
||||
this.client = client;
|
||||
this.cache = new Collection();
|
||||
this.cache = { };
|
||||
|
||||
this.hooks = [
|
||||
['message', this.onMessage.bind(this)],
|
||||
|
29
structure/client/components/observers/Automute.js
Normal file
29
structure/client/components/observers/Automute.js
Normal file
@ -0,0 +1,29 @@
|
||||
const { Observer } = require('../../../interfaces/');
|
||||
|
||||
class Automute extends Observer {
|
||||
|
||||
constructor(client) {
|
||||
|
||||
super(client, {
|
||||
name: 'automute',
|
||||
priority: 1,
|
||||
guarded: true
|
||||
});
|
||||
|
||||
this.client = client;
|
||||
|
||||
this.hooks = [
|
||||
['guildMemberAdd', this.onJoin.bind(this)]
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
async onJoin(member) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = Automute;
|
29
structure/client/components/observers/Autorole.js
Normal file
29
structure/client/components/observers/Autorole.js
Normal file
@ -0,0 +1,29 @@
|
||||
const { Observer } = require('../../../interfaces/');
|
||||
|
||||
class Autorole extends Observer {
|
||||
|
||||
constructor(client) {
|
||||
|
||||
super(client, {
|
||||
name: 'autorole',
|
||||
priority: 3,
|
||||
guarded: true
|
||||
});
|
||||
|
||||
this.client = client;
|
||||
|
||||
this.hooks = [
|
||||
['guildMemberAdd', this.onJoin.bind(this)]
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
async onJoin(member) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = Autorole;
|
36
structure/client/components/observers/BanLogger.js
Normal file
36
structure/client/components/observers/BanLogger.js
Normal file
@ -0,0 +1,36 @@
|
||||
const { Observer } = require('../../../interfaces/');
|
||||
|
||||
class BanLogger extends Observer {
|
||||
|
||||
constructor(client) {
|
||||
|
||||
super(client, {
|
||||
name: 'autorole',
|
||||
priority: 3,
|
||||
guarded: true
|
||||
});
|
||||
|
||||
this.client = client;
|
||||
|
||||
this.hooks = [
|
||||
['guildBanAdd', this.onBan.bind(this)],
|
||||
['guildBanRemove', this.onUnban.bind(this)]
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
async onBan(guild, member) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
async onUnban(guild, member) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = BanLogger;
|
36
structure/client/components/observers/Invitefilter.js
Normal file
36
structure/client/components/observers/Invitefilter.js
Normal file
@ -0,0 +1,36 @@
|
||||
const { Observer } = require('../../../interfaces/');
|
||||
|
||||
class Invitefilter extends Observer {
|
||||
|
||||
constructor(client) {
|
||||
|
||||
super(client, {
|
||||
name: 'invitefilter',
|
||||
priority: 1,
|
||||
guarded: true
|
||||
});
|
||||
|
||||
this.client = client;
|
||||
|
||||
this.hooks = [
|
||||
['messageUpdate', this.onEdit.bind(this)],
|
||||
['message', this.onMessage.bind(this)]
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
async onEdit(oldMsg, newMsg) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
async onMessage(message) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = Invitefilter;
|
36
structure/client/components/observers/Linkfilter.js
Normal file
36
structure/client/components/observers/Linkfilter.js
Normal file
@ -0,0 +1,36 @@
|
||||
const { Observer } = require('../../../interfaces/');
|
||||
|
||||
class Linkfilter extends Observer {
|
||||
|
||||
constructor(client) {
|
||||
|
||||
super(client, {
|
||||
name: 'linkfilter',
|
||||
priority: 1,
|
||||
guarded: true
|
||||
});
|
||||
|
||||
this.client = client;
|
||||
|
||||
this.hooks = [
|
||||
['messageUpdate', this.onEdit.bind(this)],
|
||||
['message', this.onMessage.bind(this)]
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
async onEdit(oldMsg, newMsg) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
async onMessage(message) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = Linkfilter;
|
36
structure/client/components/observers/MemberLogger.js
Normal file
36
structure/client/components/observers/MemberLogger.js
Normal file
@ -0,0 +1,36 @@
|
||||
const { Observer } = require('../../../interfaces/');
|
||||
|
||||
class MemberLogger extends Observer {
|
||||
|
||||
constructor(client) {
|
||||
|
||||
super(client, {
|
||||
name: 'memberLogger',
|
||||
priority: 3,
|
||||
guarded: true
|
||||
});
|
||||
|
||||
this.client = client;
|
||||
|
||||
this.hooks = [
|
||||
['guildMemberAdd', this.onJoin.bind(this)],
|
||||
['guildMemberRemove', this.onLeave.bind(this)]
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
async onJoin(member) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
async onLeave(member) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = MemberLogger;
|
36
structure/client/components/observers/MemberUpdates.js
Normal file
36
structure/client/components/observers/MemberUpdates.js
Normal file
@ -0,0 +1,36 @@
|
||||
const { Observer } = require('../../../interfaces/');
|
||||
|
||||
class MemberUpdates extends Observer {
|
||||
|
||||
constructor(client) {
|
||||
|
||||
super(client, {
|
||||
name: 'memberUpdates',
|
||||
priority: 3,
|
||||
guarded: true
|
||||
});
|
||||
|
||||
this.client = client;
|
||||
|
||||
this.hooks = [
|
||||
['voiceStateUpdate', this.onVoice.bind(this)],
|
||||
['guildMemberUpdate', this.onMember.bind(this)]
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
async onVoice(oldState, newState) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
async onMember(oldMember, newMember) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = MemberUpdates;
|
36
structure/client/components/observers/Wordfilter.js
Normal file
36
structure/client/components/observers/Wordfilter.js
Normal file
@ -0,0 +1,36 @@
|
||||
const { Observer } = require('../../../interfaces/');
|
||||
|
||||
class Wordfilter extends Observer {
|
||||
|
||||
constructor(client) {
|
||||
|
||||
super(client, {
|
||||
name: 'wordfilter',
|
||||
priority: 1,
|
||||
guarded: true
|
||||
});
|
||||
|
||||
this.client = client;
|
||||
|
||||
this.hooks = [
|
||||
['messageUpdate', this.onEdit.bind(this)],
|
||||
['message', this.onMessage.bind(this)]
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
async onEdit(oldMsg, newMsg) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
async onMessage(message) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = Wordfilter;
|
Loading…
Reference in New Issue
Block a user