Skip to content

Commit a7f42b7

Browse files
committed
Fixes for new eslint
1 parent d000dfd commit a7f42b7

7 files changed

Lines changed: 14 additions & 23 deletions

File tree

src/bot-utilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export class BotUtilities {
157157
type: "image",
158158
attachment: {
159159
attachment: unwrap(e.image ? e.image : e.thumbnail).url,
160-
} as Discord.AttachmentPayload,
160+
},
161161
};
162162
} else if (e.video) {
163163
// video but no thumbnail? just fallthrough...

src/command-abstractions/button.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,7 @@ export class ButtonInteractionBuilder<
175175
return undefined as ConditionalOptional<HasHandler, BotButtonHandler<Args>>;
176176
}
177177

178-
return new BotButtonHandler(
179-
this.base_custom_id,
180-
this.handler,
181-
this.permissions,
182-
this.metadata_fields,
183-
) as ConditionalOptional<HasHandler, BotButtonHandler<Args>>;
178+
return new BotButtonHandler(this.base_custom_id, this.handler, this.permissions, this.metadata_fields);
184179
}
185180

186181
build_button(): BotButton<Args> {

src/command-abstractions/modal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ export class ModalInteractionBuilder<
373373
this.permissions,
374374
this.metadata_fields,
375375
this.field_configs,
376-
) as ConditionalOptional<HasHandler, BotModalHandler<Args>>;
376+
);
377377
}
378378

379379
build_modal(): BotModal<Args> {

src/command-abstractions/text-based-command.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,7 @@ export class TextBasedCommand {
205205

206206
make_message_options(
207207
raw_message_options:
208-
| string
209-
| (Discord.BaseMessageOptions & CommandAbstractionReplyOptions)
210-
| Discord.MessageEditOptions,
208+
string | (Discord.BaseMessageOptions & CommandAbstractionReplyOptions) | Discord.MessageEditOptions,
211209
positional_ephemeral_if_possible = false,
212210
positional_should_text_reply = false,
213211
) {

src/modules/tccpp/components/starboard.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ export default class Starboard extends BotComponent {
252252
} else {
253253
return reaction.count >= star_threshold;
254254
}
255-
} else if (
256-
!(this.negative_emojis.includes(reaction.emoji.name) || this.ignored_emojis.includes(reaction.emoji.name))
257-
) {
255+
} else if (!(
256+
this.negative_emojis.includes(reaction.emoji.name) || this.ignored_emojis.includes(reaction.emoji.name)
257+
)) {
258258
if (parent_channel_id == this.channels.memes.id) {
259259
return reaction.count >= memes_other_threshold;
260260
} else {

src/modules/wheatley/components/username-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function is_all_ascii(str: string) {
2222
function has_three_continuous_valid_asciis(str: string) {
2323
let index: number;
2424
let consecutive_count = 0;
25-
for (index = 0; index < str.length; ) {
25+
for (index = 0; index < str.length;) {
2626
let point = str.codePointAt(index);
2727
assert(point !== undefined);
2828
if (point > 32 && point < 127) {

src/modules/wheatley/components/wiki.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -641,14 +641,12 @@ export default class Wiki extends BotComponent {
641641

642642
async wiki_preview(command: TextBasedCommand, content: string) {
643643
const channel = await command.get_channel();
644-
if (
645-
!(
646-
this.wheatley.freestanding ||
647-
channel.id === this.channels.bot_spam.id ||
648-
(channel.isThread() && channel.parentId === this.channels.bot_spam.id) ||
649-
channel.isDMBased()
650-
)
651-
) {
644+
if (!(
645+
this.wheatley.freestanding ||
646+
channel.id === this.channels.bot_spam.id ||
647+
(channel.isThread() && channel.parentId === this.channels.bot_spam.id) ||
648+
channel.isDMBased()
649+
)) {
652650
await command.reply(
653651
`!wiki-preview must be used in <#${this.channels.bot_spam.id}>, a bot-spam thread, or a DM`,
654652
true,

0 commit comments

Comments
 (0)