DiscordHono
.command()
The first argument of Command()
must match the first argument of .command()
.
The second argument of the matched .command()
is executed.
The first argument can be a regex or ''
.
''
matches all remaining unmatched parts and can be used as a fallback.
.component()
The first argument of the component element Button()
must match the first argument of .component()
.
The second argument of the matched .component()
is executed.
The first argument can be a regex or ''
.
''
matches all remaining unmatched parts and can be used as a fallback.
.autocomplete()
Add .autocomplete()
to Option()
of the command.
The first argument of Command()
must match the first argument of .autocomplete()
.
The second argument of the matched .autocomplete()
is the handler for choice generation, and the third argument is the handler for execution.
The third argument of .autocomplete()
is the same as the second argument of .command()
.
.modal()
The first argument of Modal()
must match the first argument of .modal()
.
The second argument of the matched .modal()
is executed.
The first argument can be a regex or ''
.
''
matches all remaining unmatched parts and can be used as a fallback.
.cron()
The first argument of .cron()
must match the toml file crons.
The second argument of the matched .cron()
is executed.
The first argument can be a regex or ''
.
''
matches all remaining unmatched parts and can be used as a fallback.
.fetch()
Please refer to here.
We try to be as similar as possible to Hono’s fetch().
.scheduled()
If you use export default app
, .scheduled()
is included.
Init Options
verify
If it’s a Cloudflare environment, there’s no need to use it.
discord-interactions
Deprecated: When discord-verify
doesn’t work well
discordEnv
If it’s an environment variable similar to Example, there’s no need to use it.
Use it when you save the environment variable with a different name or when it’s an environment other than Cloudflare.