We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2b70ea commit 4d48b9aCopy full SHA for 4d48b9a
playground/harmonix.config.ts
@@ -1,5 +1,3 @@
1
import { defineHarmonixConfig } from '../src'
2
3
-export default defineHarmonixConfig({
4
- ownerIds: ['556083802628161546']
5
-})
+export default defineHarmonixConfig({})
playground/preconditions/ownerOnly.ts
@@ -0,0 +1,12 @@
+import { definePrecondition, useRuntimeEnv } from '../../src'
+
+export default definePrecondition((interaction) => {
+ const env = useRuntimeEnv()
+ const authorId = interaction.member?.user.id
6
7
+ if (authorId && authorId !== env.ownerId) {
8
+ interaction?.reply('You are not the owner of this bot!')
9
+ return false
10
+ }
11
+ return true
12
+})
0 commit comments