2023-06-27 02:02:00 +00:00
|
|
|
import { ButtonInteraction, CacheType } from 'discord.js';
|
2023-07-11 19:54:57 +00:00
|
|
|
import { CYCLIC_API } from '../../constants/cyclic';
|
2023-07-15 18:44:20 +00:00
|
|
|
import { Region } from '../../constants/regions';
|
2023-10-01 16:48:53 -05:00
|
|
|
import resolvePeriodFromURL from './resolvePeriodFromURL';
|
2023-06-27 02:02:00 +00:00
|
|
|
|
|
|
|
|
export default function resolvePeriodFromButton(
|
2023-07-15 18:44:20 +00:00
|
|
|
server: Region,
|
2023-06-27 02:02:00 +00:00
|
|
|
interaction: ButtonInteraction<CacheType>,
|
|
|
|
|
) {
|
2023-07-10 01:23:49 +00:00
|
|
|
return resolvePeriodFromURL(server, `${CYCLIC_API}/${interaction.customId}`);
|
2023-06-27 02:02:00 +00:00
|
|
|
}
|