mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-14 05:06:11 +01:00
feat: added all buttons to dynamic commands
This commit is contained in:
1 parent
dd39563d6d
commit
d1d8aad6c7
9 files changed
+157
-57
No files matched your search
@@ -3,16 +3,15 @@ import {
|
||||
ButtonStyle,
|
||||
ComponentEmojiResolvable,
|
||||
} from 'discord.js';
|
||||
import { CYCLIC_API } from '../../constants/cyclic.js';
|
||||
|
||||
export default function linkButton(
|
||||
id: string,
|
||||
url: string,
|
||||
label: string,
|
||||
emoji?: ComponentEmojiResolvable,
|
||||
) {
|
||||
const button = new ButtonBuilder()
|
||||
.setStyle(ButtonStyle.Link)
|
||||
.setURL(`${CYCLIC_API}/${id}`)
|
||||
.setURL(url)
|
||||
.setLabel(label);
|
||||
|
||||
if (emoji) button.setEmoji(emoji);
|
||||
|
||||
Reference in new issue
Block a user