import type { Member , Message , TextChannel } from "eris" ; import { Command } from "../../classes/Command" ; export class CookiesCommand extends Command { description = "Tells how many cookies you or another member has." ; args = "<member:member&fallback>" ; aliases = [ "bal" , "balance" ] ; async run ( msg , pargs ) { let cookieAmount = 0 ; const member = pargs [ 0 ] . value as Member ; const cookies = await this . bot . db . getUserCookies ( member . id ) ; if ( cookies ?. amount ) cookieAmount = cookies . amount ; msg . createEmbed ( `🍪 ${ msg . string ( "fun.COOKIES" ) }` , msg . string ( "fun.COOKIES_AMOUNT" , { member : member . user . username , amount : cookieAmount } ) ) ; } }