Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrowM committed Jul 1, 2024
1 parent 1ab9a9a commit 99b7cf0
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion data/migrations/0004_ancient_proemial_gods.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ALTER TABLE `queue` RENAME COLUMN `notifications_toggle` TO `dm_member_on_pull_toggle`;--> statement-breakpoint
ALTER TABLE `queue` RENAME COLUMN `notifications_toggle` TO `dm_member_toggle`;--> statement-breakpoint
ALTER TABLE `queue` ADD `pull_message_display_type` text DEFAULT 'private' NOT NULL;
6 changes: 3 additions & 3 deletions data/migrations/meta/0004_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,8 @@
"autoincrement": false,
"default": "'edit'"
},
"dm_member_on_pull_toggle": {
"name": "dm_member_on_pull_toggle",
"dm_member_toggle": {
"name": "dm_member_toggle",
"type": "integer",
"primaryKey": false,
"notNull": true,
Expand Down Expand Up @@ -1256,7 +1256,7 @@
"schemas": {},
"tables": {},
"columns": {
"\"queue\".\"notifications_toggle\"": "\"queue\".\"dm_member_on_pull_toggle\""
"\"queue\".\"notifications_toggle\"": "\"queue\".\"dm_member_toggle\""
}
},
"internal": {
Expand Down
2 changes: 1 addition & 1 deletion src/options/base-option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export abstract class BaseOption<BuilderType extends ApplicationCommandOptionBas
selection = this.getUncached(inter);
inter.parser.cache.set(this.identifier, selection);
}
if (selection === undefined && (this.config?.required ?? this.required)) {
if (selection == undefined && (this.config?.required ?? this.required)) {
throw new Error(`Required option ${this.identifier} not found`);
}
return selection;
Expand Down
1 change: 1 addition & 0 deletions src/options/options/admins.option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export class AdminsOption extends CustomOption {
// send and receive
const selectMenuTransactor = new SelectMenuTransactor(inter);
const result = await selectMenuTransactor.sendAndReceive(label, options);
if (!result) return;

// parse result
const adminIds = result.map(id => BigInt(id));
Expand Down
1 change: 1 addition & 0 deletions src/options/options/blacklisteds.option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class BlacklistedsOption extends CustomOption {
// send and receive
const selectMenuTransactor = new SelectMenuTransactor(inter);
const result = await selectMenuTransactor.sendAndReceive(label, options);
if (!result) return;

// parse result
const blacklistedIds = result.map(id => BigInt(id));
Expand Down
1 change: 1 addition & 0 deletions src/options/options/displays.option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class DisplaysOption extends CustomOption {
// send and receive
const selectMenuTransactor = new SelectMenuTransactor(inter);
const result = await selectMenuTransactor.sendAndReceive(label, options);
if (!result) return;

// parse result
const displayIds = result.map(id => BigInt(id));
Expand Down
1 change: 1 addition & 0 deletions src/options/options/members.option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export class MembersOption extends CustomOption {
// send and receive
const selectMenuTransactor = new SelectMenuTransactor(inter);
const result = await selectMenuTransactor.sendAndReceive(label, options);
if (!result) return;

// parse result
const resultIds = result.map(id => BigInt(id));
Expand Down
1 change: 1 addition & 0 deletions src/options/options/prioritizeds.option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class PrioritizedsOption extends CustomOption {
// send and receive
const selectMenuTransactor = new SelectMenuTransactor(inter);
const result = await selectMenuTransactor.sendAndReceive(label, options);
if (!result) return;

// parse result
const prioritizedIds = result.map(id => BigInt(id));
Expand Down
1 change: 1 addition & 0 deletions src/options/options/queues.option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export class QueuesOption extends CustomOption {
// send and receive
const selectMenuTransactor = new SelectMenuTransactor(inter);
const result = await selectMenuTransactor.sendAndReceive(label, options);
if (!result) return;

// parse result
const queueIds = result.map(id => BigInt(id));
Expand Down
1 change: 1 addition & 0 deletions src/options/options/schedules.option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class SchedulesOption extends CustomOption {
// send and receive
const selectMenuTransactor = new SelectMenuTransactor(inter);
const result = await selectMenuTransactor.sendAndReceive(label, options);
if (!result) return;

// parse result
const scheduleIds = result.map(id => BigInt(id));
Expand Down
1 change: 1 addition & 0 deletions src/options/options/voices.option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class VoicesOption extends CustomOption {
// send and receive
const selectMenuTransactor = new SelectMenuTransactor(inter);
const result = await selectMenuTransactor.sendAndReceive(label, options);
if (!result) return;

// parse result
const voiceIds = result.map(id => BigInt(id));
Expand Down
1 change: 1 addition & 0 deletions src/options/options/whitelisteds.option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class WhitelistedsOption extends CustomOption {
// send and receive
const selectMenuTransactor = new SelectMenuTransactor(inter);
const result = await selectMenuTransactor.sendAndReceive(label, options);
if (!result) return;

// parse result
const whitelistedIds = result.map(id => BigInt(id));
Expand Down
2 changes: 1 addition & 1 deletion src/utils/member.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export namespace MemberUtils {
if (messageChannelId && queue.pullMessageDisplayType === PullMessageDisplayType.Public) {
const messageChannel = await store.jsChannel(messageChannelId) as GuildTextBasedChannel;
if (messageChannel) {
const sentMessage = await messageChannel?.send(messageToSend);
const sentMessage = await messageChannel.send(messageToSend).catch(() => null);
LoggingUtils.log(store, true, sentMessage).catch(() => null);
link = sentMessage?.url;
}
Expand Down

0 comments on commit 99b7cf0

Please sign in to comment.