-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored pagination. Added pagination to /pl-display. Added playlist name and songs count in /pl-display. Added info about /pl-* commands to wiki.
- Loading branch information
1 parent
6e6150a
commit ed5ef9d
Showing
17 changed files
with
255 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { pagination } from '../utilities/pagination/pagination.js'; | ||
import { Embed, EmbedBuilder, Message, User } from 'discord.js'; | ||
import { ButtonStyles, ButtonTypes } from '../utilities/pagination/paginationTypes.js'; | ||
import { ReplyContext } from '../CommandTypes.js'; | ||
|
||
export async function PaginationList(ctx: ReplyContext, pages: Array<Embed | EmbedBuilder>, user: User) { | ||
await pagination({ | ||
embeds: pages as unknown as Array<Embed>, | ||
author: user, | ||
message: ctx instanceof Message ? ctx : undefined, | ||
interaction: ctx instanceof Message ? undefined : ctx, | ||
ephemeral: true, | ||
fastSkip: true, | ||
pageTravel: false, | ||
buttons: [ | ||
{ | ||
type: ButtonTypes.first, | ||
emoji: '⬅️', | ||
style: ButtonStyles.Secondary | ||
}, | ||
{ | ||
type: ButtonTypes.previous, | ||
emoji: '◀️', | ||
style: ButtonStyles.Secondary | ||
}, | ||
{ | ||
type: ButtonTypes.next, | ||
emoji: '▶️', | ||
style: ButtonStyles.Secondary | ||
}, | ||
{ | ||
type: ButtonTypes.last, | ||
emoji: '➡️', | ||
style: ButtonStyles.Secondary | ||
} | ||
] | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.