feat(cli): add command helpers and NotAPlayerError
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { PlayerCommandOrigin } from '../PlayerCommandOrigin';
|
||||
import { NotAPlayerError } from '../../Errors/NotAPlayerError';
|
||||
|
||||
export function requirePlayer(source) {
|
||||
if (!(source instanceof PlayerCommandOrigin))
|
||||
throw new NotAPlayerError();
|
||||
return source.getSource();
|
||||
}
|
||||
Reference in New Issue
Block a user