Skip to content

Commit

Permalink
commands: Add echo
Browse files Browse the repository at this point in the history
  • Loading branch information
PartMan7 committed Oct 28, 2024
1 parent d8224b8 commit c0e55d4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/ps/commands/echo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { checkPermissions } from '@/ps/handlers/permissions';
import { ACCESS_DENIED } from '@/text';

export const command: PSCommand = {
name: 'echo',
help: 'Echoes the given text',
syntax: 'CMD (text)',
aliases: ['do'],
perms: ['room', 'voice'],
async run({ message, originalCommand: [originalCommand], arg }) {
if (originalCommand === 'do') {
if (checkPermissions('admin', message)) message.reply(arg);
else throw new ChatError(ACCESS_DENIED);
} else message.reply(`[[ ]]${arg}`);
},
};

0 comments on commit c0e55d4

Please sign in to comment.