This repository has been archived by the owner on Oct 13, 2024. 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
Showing
48 changed files
with
663 additions
and
0 deletions.
There are no files selected for viewing
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,13 @@ | ||
module.exports = { | ||
name: "Audit Log Created", | ||
nameSchemes: ["Store Audit Log As"], | ||
|
||
initialize(client, data, run) { | ||
client.on('guildAuditLogEntryCreate', (guild, auditLogEntry) => { | ||
run([ | ||
auditLogEntry | ||
], { guild }) | ||
}) | ||
} | ||
}; | ||
|
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,7 @@ | ||
module.exports = { | ||
name: "Bot Ready", | ||
nameSchemes: [], | ||
initialize(client, data, run) { | ||
run([], {}) | ||
} | ||
} |
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,9 @@ | ||
module.exports = { | ||
name: "Messages Bulk Delete", | ||
nameSchemes: ["Store Deleted Messages List As"], | ||
initialize(client, data, run) { | ||
client.on('messageDeleteBulk', (messages) => { | ||
run(messages, messages) | ||
}) | ||
} | ||
}; |
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,15 @@ | ||
module.exports = { | ||
name: "Button Interaction", | ||
nameSchemes: ["Store Button Interaction As", "Store Button Custom ID As", "Store Button Message As"], | ||
initialize(client, data, run) { | ||
client.on('interactionCreate', (interaction) => { | ||
if (interaction.type != 3 || interaction.data.values) return; | ||
|
||
run([ | ||
interaction, | ||
interaction.data.customID, | ||
interaction.message | ||
], interaction) | ||
}) | ||
} | ||
}; |
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,12 @@ | ||
module.exports = { | ||
name: "Channel Create", | ||
nameSchemes: ["Store Channel As"], | ||
|
||
initialize(client, data, run) { | ||
client.on('channelCreate', (channel) => { | ||
run([ | ||
channel | ||
], channel) | ||
}) | ||
} | ||
}; |
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,12 @@ | ||
module.exports = { | ||
name: "Channel Delete", | ||
nameSchemes: ["Store Channel As"], | ||
|
||
initialize(client, data, run) { | ||
client.on('channelDelete', (channel) => { | ||
run([ | ||
channel | ||
], channel) | ||
}) | ||
} | ||
}; |
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,12 @@ | ||
module.exports = { | ||
name: "Channel Pins Update", | ||
nameSchemes: ["Store Channel As"], | ||
|
||
initialize(client, data, run) { | ||
client.on('channelPinsUpdate', (channel) => { | ||
run([ | ||
channel | ||
], channel) | ||
}) | ||
} | ||
}; |
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,12 @@ | ||
module.exports = { | ||
name: "Channel Update", | ||
nameSchemes: ["Store Channel Before Update As", "Store Channel After Update As"], | ||
initialize(client, data, run) { | ||
client.on('channelUpdate', (updated, old) => { | ||
run([ | ||
old, | ||
updated | ||
], updated) | ||
}) | ||
} | ||
}; |
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,17 @@ | ||
module.exports = { | ||
name: "Cron Job", | ||
nameSchemes: [`Cron String Input | ||
<div class="hoverablez" onclick="require('electron').shell.openExternal('https://crontab.guru/')" style="width: 96%; margin: auto; padding-bottom: 12px; margin-bottom: -12px; border-radius: 8px;"><text style="margin-left:8px; padding: 3px;">Examples</text></div>`, | ||
"Cron Timezone (Leave blank for default)" | ||
], | ||
preventStorage: [`Cron String Input | ||
<div class="hoverablez" onclick="require('electron').shell.openExternal('https://crontab.guru/')" style="width: 96%; margin: auto; padding-bottom: 12px; margin-bottom: -12px; border-radius: 8px;"><text style="margin-left:8px; padding: 3px;">Examples</text></div>`, | ||
"Cron Timezone (Leave blank for default)" | ||
], | ||
initialize(client, data, run) { | ||
const cron = require('node-cron'); | ||
cron.schedule(data[0], () => { | ||
run([], {}); | ||
}, data[1] ? {timezone: data[1]} : null); | ||
} | ||
}; |
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,16 @@ | ||
module.exports = { | ||
name: "Select Menu Interaction", | ||
nameSchemes: ["Store Menu Interaction As", "Store Menu Custom ID As", "Store Choices Values List As", "Store Interaction Message As"], | ||
initialize(client, data, run) { | ||
client.on('interactionCreate', (interaction) => { | ||
if (interaction.type != 3 || !interaction.data.values) return; | ||
|
||
run([ | ||
interaction, | ||
interaction.data.customID, | ||
interaction.data.values.raw, | ||
interaction.message | ||
], interaction) | ||
}) | ||
} | ||
}; |
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,11 @@ | ||
module.exports = { | ||
name: "Bot Join Server", | ||
nameSchemes: ["Store Server As"], | ||
initialize(client, data, run) { | ||
client.on('guildCreate', (guild) => { | ||
run([ | ||
guild | ||
], {guild}) | ||
}) | ||
} | ||
}; |
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,11 @@ | ||
module.exports = { | ||
name: "Bot Leave Server", | ||
nameSchemes: ["Store Server As"], | ||
initialize(client, data, run) { | ||
client.on('guildDelete', (guild) => { | ||
run([ | ||
guild | ||
], {guild}) | ||
}) | ||
} | ||
}; |
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,16 @@ | ||
module.exports = { | ||
name: "Member Ban", | ||
nameSchemes: ["Store Guild As", "Store Member As"], | ||
initialize(client, data, run) { | ||
client.on('guildBanAdd', async (guild, member) => { | ||
if (!guild.createdAt) { | ||
guild = await client.rest.guilds.get(guild.id) | ||
} | ||
|
||
run([ | ||
member.guild, | ||
member | ||
], { guild }) | ||
}) | ||
} | ||
}; |
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,16 @@ | ||
module.exports = { | ||
name: "Member Unban", | ||
nameSchemes: ["Store Guild As", "Store Member As"], | ||
initialize(client, data, run) { | ||
client.on('guildBanRemove', async (guild, member) => { | ||
if (!guild.createdAt) { | ||
guild = await client.rest.guilds.get(guild.id) | ||
} | ||
|
||
run([ | ||
member.guild, | ||
member | ||
], member) | ||
}) | ||
} | ||
}; |
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,11 @@ | ||
module.exports = { | ||
name: "Invite Create", | ||
nameSchemes: ["Store Invite As"], | ||
initialize(client, data, run) { | ||
client.on('inviteCreate', (invite) => { | ||
run([ | ||
invite | ||
], invite) | ||
}) | ||
} | ||
}; |
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,11 @@ | ||
module.exports = { | ||
name: "Invite Delete", | ||
nameSchemes: ["Store Invite As"], | ||
initialize(client, data, run) { | ||
client.on('inviteDelete', (invite) => { | ||
run([ | ||
invite | ||
], invite) | ||
}) | ||
} | ||
}; |
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,19 @@ | ||
const { Client } = require("oceanic.js"); | ||
|
||
module.exports = { | ||
name: "Member Boosted Server", | ||
nameSchemes: ["Store Member As", "Store Server As"], | ||
|
||
/** | ||
* @param {Client} client | ||
* @param {*} data | ||
* @param {*} run | ||
*/ | ||
initialize(client, data, run) { | ||
client.on('guildMemberUpdate', async (member, oldMember) => { | ||
if (!oldMember.premiumSince && member.premiumSince) { | ||
run([member, member.guild], member); | ||
} | ||
}); | ||
} | ||
}; |
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,11 @@ | ||
module.exports = { | ||
name: "Member Join Server", | ||
nameSchemes: ["Store Member As"], | ||
async initialize(client, data, run) { | ||
client.on('guildMemberAdd', async (member) => { | ||
run([ | ||
member | ||
], member) | ||
}) | ||
} | ||
}; |
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,11 @@ | ||
module.exports = { | ||
name: "Member Leave Server", | ||
nameSchemes: ["Store Member As"], | ||
async initialize(client, data, run) { | ||
client.on('guildMemberRemove', async (member) => { | ||
run([ | ||
member | ||
], member) | ||
}) | ||
} | ||
}; |
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,18 @@ | ||
module.exports = { | ||
name: "Member Role Add", | ||
nameSchemes: ["Store Member As", "Store Role As"], | ||
initialize(client, data, run) { | ||
client.on('guildMemberUpdate', (member, oldMember) => { | ||
if (oldMember && member.roles.length > oldMember.roles.length) { | ||
let roleID = member.roles.find(r => !oldMember.roles.includes(r)); | ||
let role = member.guild.roles.get(roleID); | ||
|
||
run([ | ||
member, | ||
role | ||
], { guild: member.guild }) | ||
} | ||
}) | ||
} | ||
}; | ||
|
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,18 @@ | ||
module.exports = { | ||
name: "Member Role Remove", | ||
nameSchemes: ["Store Member As", "Store Role As"], | ||
initialize(client, data, run) { | ||
client.on('guildMemberUpdate', (member, oldMember) => { | ||
if (oldMember && member.roles.length < oldMember.roles.length) { | ||
let roleID = oldMember.roles.find(r => !member.roles.includes(r)); | ||
let role = member.guild.roles.get(roleID); | ||
|
||
run([ | ||
member, | ||
role | ||
], { guild: member.guild }) | ||
} | ||
}) | ||
} | ||
}; | ||
|
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,17 @@ | ||
module.exports = { | ||
name: "Member Move Voice Channel", | ||
nameSchemes: ["Store Member As", "Store Old Channel As", "Store New Channel As"], | ||
async initialize(client, data, run) { | ||
client.on('voiceChannelSwitch', async (member, oldChannel, channel) => { | ||
let channel1 = client.getChannel(channel.id) || (await client.rest.channels.get(channel.id)); | ||
let channel2 = client.getChannel(oldChannel.id) || (await client.rest.channels.get(oldChannel.id)); | ||
let user = member.user; | ||
user.member = member; | ||
run([ | ||
user, | ||
channel1, | ||
channel2 | ||
], {guild: member.guild}) | ||
}) | ||
} | ||
} |
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,22 @@ | ||
const { Client } = require("oceanic.js"); | ||
|
||
module.exports = { | ||
name: "Member Update", | ||
nameSchemes: ["Store Member As", "Store Old Member As"], | ||
|
||
/** | ||
* @param {Client} client | ||
* @param {*} data | ||
* @param {*} run | ||
*/ | ||
initialize(client, data, run) { | ||
client.on('guildMemberUpdate', async (member, oldJSONMember) => { | ||
const {Member} = require('oceanic.js'); | ||
let old = new Member(oldJSONMember); | ||
run([ | ||
member, | ||
old | ||
], member) | ||
}) | ||
} | ||
}; |
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,13 @@ | ||
module.exports = { | ||
name: "Member Voice Update", | ||
nameSchemes: ["Store Current Member As"], | ||
async initialize(client, data, run) { | ||
client.on('voiceStateUpdate', (member) => { | ||
let user = member.user; | ||
user.member = member; | ||
run([ | ||
user | ||
], {guild: member.guild}) | ||
}) | ||
} | ||
} |
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,11 @@ | ||
module.exports = { | ||
name: "Message Create", | ||
nameSchemes: ["Store Message As"], | ||
initialize(client, data, run) { | ||
client.on('messageCreate', (message) => { | ||
run([ | ||
message | ||
], message) | ||
}) | ||
} | ||
}; |
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,11 @@ | ||
module.exports = { | ||
name: "Message Delete", | ||
nameSchemes: ["Store Message As"], | ||
initialize(client, data, run) { | ||
client.on('messageDelete', async (message) => { | ||
run([ | ||
message | ||
], message) | ||
}) | ||
} | ||
}; |
Oops, something went wrong.