mirror of
https://github.com/xHyroM/roles-bot.git
synced 2024-11-23 00:41:06 +01:00
17 lines
373 B
TypeScript
17 lines
373 B
TypeScript
|
import { ButtonStyle } from "discord-api-types/v10";
|
||
|
|
||
|
export default function (style: string) {
|
||
|
switch (style.toLowerCase()) {
|
||
|
case "primary":
|
||
|
return ButtonStyle.Primary;
|
||
|
case "secondary":
|
||
|
return ButtonStyle.Secondary;
|
||
|
case "success":
|
||
|
return ButtonStyle.Success;
|
||
|
case "danger":
|
||
|
return ButtonStyle.Danger;
|
||
|
default:
|
||
|
return ButtonStyle.Primary;
|
||
|
}
|
||
|
}
|