chore: hmmm

permalink: http://whatthecommit.com/d80df00961644ea75c3ce283ac3d7f32
This commit is contained in:
EvolutionX
2022-09-25 21:09:42 +05:30
parent cff01b5179
commit 9ec036fd3a
4 changed files with 9 additions and 7 deletions

View File

@@ -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",

View File

@@ -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 &&

View File

@@ -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();
},
};

View File

@@ -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"
]
},
{