feat: id discovery

This commit is contained in:
TrèsAbhi committed 2024-05-18 21:12:11 -05:00
1 parent 87b44d1c27
commit b4c7b07158
6 files changed
+222

No files matched your search

+12
View File
@@ -1,5 +1,17 @@
import { Region } from '../../constants/regions';
export const MIN_IDS: Record<Region, number> = {
asia: 20e8,
com: 10e8,
eu: 5e8,
};
export const MAX_IDS: Record<Region, number> = {
asia: 31e8 - 1,
com: MIN_IDS.asia - 1,
eu: MIN_IDS.com - 1,
};
export function idToRegion(id: number): Region {
if (id >= 42e8) {
throw new Error('bot id');