mirror of
https://github.com/sern-handler/sern-community
synced 2026-06-06 01:16:57 +00:00
chore: hmmm
permalink: http://whatthecommit.com/d80df00961644ea75c3ce283ac3d7f32
This commit is contained in:
@@ -15,7 +15,7 @@ const require = createRequire(import.meta.url);
|
||||
|
||||
export default commandModule({
|
||||
type: CommandType.Slash,
|
||||
plugins: [publish(), ownerOnly()],
|
||||
plugins: [publish(), ownerOnly(["697795666373640213"])],
|
||||
options: [
|
||||
{
|
||||
name: "create",
|
||||
|
||||
@@ -22,7 +22,7 @@ export default eventModule({
|
||||
const data = fuzz.fuzzyMatch();
|
||||
if (!data) return;
|
||||
const { tag, confidence } = data;
|
||||
if (confidence <= 0.5) return;
|
||||
if (confidence <= 0.7) return;
|
||||
|
||||
if (
|
||||
message.author.data &&
|
||||
|
||||
@@ -4,14 +4,17 @@ export const ownerIDs = [
|
||||
"182326315813306368",
|
||||
"756393473430519849",
|
||||
];
|
||||
export function ownerOnly(): EventPlugin<CommandType.Both> {
|
||||
export function ownerOnly(override?: string[]): EventPlugin<CommandType.Both> {
|
||||
return {
|
||||
type: PluginType.Event,
|
||||
description: "Allows only bot owner to run command",
|
||||
async execute(event, controller) {
|
||||
const [ctx] = event;
|
||||
if (ownerIDs.includes(ctx.user.id)) return controller.next();
|
||||
|
||||
if ((override ?? ownerIDs).includes(ctx.user.id)) return controller.next();
|
||||
await ctx.reply({
|
||||
content: 'Not for you!',
|
||||
ephemeral: true
|
||||
})
|
||||
return controller.stop();
|
||||
},
|
||||
};
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
"name": "Missing Intents",
|
||||
"content": "If you get an error that says \"Missing Intents\", you probably want to add them. __Don't include intents that you won't use.__ You can check what intents you need [here](https://ziad87.net/intents/).",
|
||||
"keywords": [
|
||||
"missing intents",
|
||||
"you need intents"
|
||||
"missing intents"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user