From 166d7fdf24440db71311c2cda95697c06e7b8b36 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Thu, 21 Oct 2021 00:05:53 -0400 Subject: Refactoring, rewrote ButtonPaginator, better permission handling + support for send messages in threads, optimizations, another scam link --- src/commands/fun/coinflip.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/commands/fun/coinflip.ts') diff --git a/src/commands/fun/coinflip.ts b/src/commands/fun/coinflip.ts index e0892b7..42e7167 100644 --- a/src/commands/fun/coinflip.ts +++ b/src/commands/fun/coinflip.ts @@ -10,14 +10,15 @@ export default class CoinFlipCommand extends BushCommand { usage: 'coinflip', examples: ['coinflip'] }, - clientPermissions: ['SEND_MESSAGES'] + clientPermissions: (m) => util.clientSendAndPermCheck(m), + userPermissions: [] }); } public override async exec(message: BushMessage | BushSlashMessage): Promise { const random = Math.random(); let result: string; - const fall = message.author.id === '322862723090219008' ? 0.1 : 0.001; + const fall = message.author.id === '322862723090219008' ? 0.1 : 0.001; //dw about it if (random < fall) result = 'The coin fell off the table :('; else if (random <= 0.5 + fall / 2) result = 'Heads'; else result = 'Tails'; -- cgit