Skip to content

Commit

Permalink
commands: add contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
salix5 committed May 19, 2024
1 parent 93b6c78 commit 5620e15
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions commands/card-en.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const data = new SlashCommandBuilder()
.setAutocomplete(true)
);
data.integration_types = [0, 1];
data.contexts = [0, 1, 2];
export async function autocomplete(interaction) {
await autocomplete_default(interaction, 'en');
}
Expand Down
1 change: 1 addition & 0 deletions commands/card-jp.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const data = new SlashCommandBuilder()
.setAutocomplete(true)
);
data.integration_types = [0, 1];
data.contexts = [0, 1, 2];
export { autocomplete_jp as autocomplete } from '../common_all.js';
export async function execute(interaction) {
await query_command(interaction, 'ja', 'zh-tw');
Expand Down
1 change: 1 addition & 0 deletions commands/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const data = new SlashCommandBuilder()
.setAutocomplete(true)
);
data.integration_types = [0, 1];
data.contexts = [0, 1, 2];
export async function autocomplete(interaction) {
await autocomplete_default(interaction, 'full');
}
Expand Down
1 change: 1 addition & 0 deletions commands/dice.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const data = new SlashCommandBuilder()
.setMaxValue(0xffffffffffff)
);
data.integration_types = [0, 1];
data.contexts = [0, 1, 2];
export async function execute(interaction) {
const face = interaction.options.getInteger('face');
if (face) {
Expand Down
1 change: 1 addition & 0 deletions commands/jp-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const data = new SlashCommandBuilder()
.setAutocomplete(true)
);
data.integration_types = [0, 1];
data.contexts = [0, 1, 2];
export async function autocomplete(interaction) {
await autocomplete_default(interaction, 'zh-tw');
}
Expand Down
1 change: 1 addition & 0 deletions commands/md-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const data = new SlashCommandBuilder()
.setAutocomplete(true)
);
data.integration_types = [0, 1];
data.contexts = [0, 1, 2];
export async function autocomplete(interaction) {
await autocomplete_default(interaction, 'zh-tw');
}
Expand Down
1 change: 1 addition & 0 deletions commands/ocg-ae.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const data = new SlashCommandBuilder()
.setAutocomplete(true)
);
data.integration_types = [0, 1];
data.contexts = [0, 1, 2];
export const cooldown = 2;
export async function autocomplete(interaction) {
await autocomplete_default(interaction, request_locale);
Expand Down
1 change: 1 addition & 0 deletions commands/ocg-jp.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const data = new SlashCommandBuilder()
.setAutocomplete(true)
);
data.integration_types = [0, 1];
data.contexts = [0, 1, 2];
export const cooldown = 2;
export { autocomplete_jp as autocomplete } from '../common_all.js';
export async function execute(interaction) {
Expand Down
1 change: 1 addition & 0 deletions commands/ocg-kr.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const data = new SlashCommandBuilder()
.setAutocomplete(true)
);
data.integration_types = [0, 1];
data.contexts = [0, 1, 2];
export const cooldown = 2;
export async function autocomplete(interaction) {
await autocomplete_default(interaction, request_locale);
Expand Down
1 change: 1 addition & 0 deletions commands/random.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const data = new SlashCommandBuilder()
.setName('random')
.setDescription('從OCG卡池隨機抽一張卡');
data.integration_types = [0, 1];
data.contexts = [0, 1, 2];
export async function execute(interaction) {
const cid = keys[await rand(keys.length)];
const card = get_card(cid);
Expand Down
1 change: 1 addition & 0 deletions commands/tcg-en.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const data = new SlashCommandBuilder()
.setAutocomplete(true)
);
data.integration_types = [0, 1];
data.contexts = [0, 1, 2];
export const cooldown = 2;
export async function autocomplete(interaction) {
await autocomplete_default(interaction, request_locale);
Expand Down
1 change: 1 addition & 0 deletions commands/ygocdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const data = new SlashCommandBuilder()
.setAutocomplete(true)
);
data.integration_types = [0, 1];
data.contexts = [0, 1, 2];
export async function autocomplete(interaction) {
await autocomplete_default(interaction, 'zh-tw');
}
Expand Down

0 comments on commit 5620e15

Please sign in to comment.