Skip to content

Commit

Permalink
Remove ts-ignore in UserRichDisplay and normalize line endings. (#390)
Browse files Browse the repository at this point in the history
* src: remove a ts-ignore

* lint: fix lint

* line endings
  • Loading branch information
PyroTechniac authored and kyranet committed Oct 22, 2019
1 parent 74b69e2 commit b3465be
Show file tree
Hide file tree
Showing 13 changed files with 763 additions and 763 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
## These files are text and should be normalized (Convert crlf => lf)
#

* text eol=lf

# source code
*.php text
*.css text
Expand Down
1,500 changes: 750 additions & 750 deletions docker/postgres/configuration.example.conf

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/commands/Anime/anime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class extends SkyraCommand {

const display = this.buildDisplay(entries, message);

await display.run(response, message.author.id);
await display.start(response, message.author.id);
return response;
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/Anime/manga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class extends SkyraCommand {

const display = this.buildDisplay(entries, message);

await display.run(response, message.author.id);
await display.start(response, message.author.id);
return response;
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/General/Chat Bot Info/help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class extends SkyraCommand {
if (startPage !== null) {
if (startPage < 0 || startPage >= display.pages.length) startPage = 0;
}
await display.run(response, message.author!.id, startPage === null ? undefined : { startPage });
await display.start(response, message.author!.id, startPage === null ? undefined : { startPage });
return response;
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/Management/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default class extends SkyraCommand {
for (let i = 0; i < pages; i++) display.addPage((template: MessageEmbed) => template.setDescription(roles.slice(i * 10, (i * 10) + 10)));

const response = await message.sendEmbed(new MessageEmbed({ description: message.language.tget('SYSTEM_LOADING'), color: getColor(message) || 0xFFAB2D })) as KlasaMessage;
await display.run(response, message.author!.id);
await display.start(response, message.author!.id);
return response;
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/Management/triggers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default class extends SkyraCommand {
display.addPage((embed: MessageEmbed) => embed.setDescription(page));
}

return display.run(message, undefined, { time: 120000 });
return display.start(message, undefined, { time: 120000 });
}

private _format(type: string, input: string, output: string) {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Moderation/Management/mutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default class extends SkyraCommand {
}

const response = await message.sendEmbed(new MessageEmbed({ description: message.language.tget('SYSTEM_LOADING'), color: getColor(message) || 0xFFAB2D })) as KlasaMessage;
await display.run(response, message.author!.id);
await display.start(response, message.author!.id);
return response;
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/Moderation/Management/warnings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default class extends SkyraCommand {
}

const response = await message.sendEmbed(new MessageEmbed({ description: message.language.tget('SYSTEM_LOADING'), color: getColor(message) || 0xFFAB2D })) as KlasaMessage;
await display.run(response, message.author!.id);
await display.start(response, message.author!.id);
return response;
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/Social/Profile Management/banner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default class extends SkyraCommand {

private async _runDisplay(message: KlasaMessage, display: UserRichDisplay) {
const response = await message.sendEmbed(new MessageEmbed({ description: message.language.tget('SYSTEM_LOADING'), color: getColor(message) || 0xFFAB2D })) as KlasaMessage;
await display.run(response, message.author!.id);
await display.start(response, message.author!.id);
return response;
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/Social/remindme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class extends SkyraCommand {
for (const page of pages) display.addPage((template: MessageEmbed) => template.setDescription(page.join('\n')));

const response = await message.sendEmbed(new MessageEmbed({ description: message.language.tget('SYSTEM_LOADING'), color: getColor(message) || 0xFFAB2D })) as KlasaMessage;
await display.run(response, message.author!.id);
await display.start(response, message.author!.id);
return response;
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/Tools/Dictionary/urban.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class extends SkyraCommand {

const display = this.buildDisplay(list, message, query);

await display.run(response, message.author!.id);
await display.start(response, message.author!.id);
return response;
}

Expand Down
4 changes: 1 addition & 3 deletions src/lib/structures/UserRichDisplay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ const FIVE_MINUTES = 60000 * 5;

export class UserRichDisplay extends RichDisplay {

// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
public async run(message: KlasaMessage, target: string = message.author!.id, options: RichDisplayRunOptions = {}): Promise<ReactionHandler> {
public async start(message: KlasaMessage, target: string = message.author!.id, options: RichDisplayRunOptions = {}): Promise<ReactionHandler> {
util.mergeDefault({
filter: (_: MessageReaction, user: KlasaUser) => user.id === target,
time: FIVE_MINUTES
Expand Down

0 comments on commit b3465be

Please sign in to comment.