userID blacklist
This commit is contained in:
parent
f0c23d92af
commit
58936438d9
1 changed files with 5 additions and 1 deletions
6
index.ts
6
index.ts
|
@ -21,6 +21,10 @@ export default definePlugin({
|
||||||
type: OptionType.STRING,
|
type: OptionType.STRING,
|
||||||
description: "Comma-separated list of channel IDs to watch"
|
description: "Comma-separated list of channel IDs to watch"
|
||||||
},
|
},
|
||||||
|
userIDs: {
|
||||||
|
type: OptionType.STRING,
|
||||||
|
description: "Comma-separated list of user IDs to ignore"
|
||||||
|
},
|
||||||
maxChars: {
|
maxChars: {
|
||||||
type: OptionType.NUMBER,
|
type: OptionType.NUMBER,
|
||||||
description: "Maximum chars to check",
|
description: "Maximum chars to check",
|
||||||
|
@ -32,7 +36,7 @@ export default definePlugin({
|
||||||
({ guildId, message }) {
|
({ guildId, message }) {
|
||||||
|
|
||||||
const msg = message as Message;
|
const msg = message as Message;
|
||||||
if (UserStore.getCurrentUser().id === msg.author.id) return;
|
if (UserStore.getCurrentUser().id === msg.author.id || selfPlugin.settings.store.userIDs?.split(",").includes(msg.author.id)) return;
|
||||||
if (!selfPlugin.settings.store.channelIDs?.split(",").includes(msg.channel_id) || msg.content.length > selfPlugin.settings.store.maxChars) return;
|
if (!selfPlugin.settings.store.channelIDs?.split(",").includes(msg.channel_id) || msg.content.length > selfPlugin.settings.store.maxChars) return;
|
||||||
|
|
||||||
const res = await fetch("https://huskapi.nin0.dev", {
|
const res = await fetch("https://huskapi.nin0.dev", {
|
||||||
|
|
Loading…
Reference in a new issue