feat: added all buttons to dynamic commands

This commit is contained in:
TresAbhi committed 2023-06-28 18:45:14 +00:00
1 parent dd39563d6d
commit d1d8aad6c7
9 files changed
+157 -57

No files matched your search

+2 -3
View File
@@ -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);