import { Structures } from 'detritus-client' ; import { toCamelCase } from 'detritus-client/lib/utils' ; import { NotSoBotKeys } from '../../constants' ; export function convertKey ( snake ) { if ( snake in NotSoBotKeys ) { return NotSoBotKeys [ snake ] ; } return toCamelCase ( snake ) ; } export class BaseStructure extends Structures . Structure { _getFromSnake ( key ) { return ( this as any ) [ convertKey ( key ) ] ; } _setFromSnake ( key , value ) { return ( this as any ) [ convertKey ( key ) ] = value ; } }