Skip to content

Commit

Permalink
refactor commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ender-null committed Apr 12, 2024
1 parent 86b8144 commit 6695a4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,6 @@ export class Bot {
trigger = command.replace('/', `^${escapeRegExp(this.config.prefix)}`);
}

if (command.startsWith('@')) {
trigger = command.replace('@', '^@');
}

if (!friendly) {
if (parameters == null && trigger.startsWith('^')) {
trigger += '$';
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/chatgpt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ export class EchoPlugin extends PluginBase {
super(bot);
this.commands = [
{
command: `@${this.bot.user.username}`,
command: `/chatgpt`,
parameters: [
{
name: 'text',
required: false,
required: true,
},
],
friendly: `^@${this.bot.user.username}`,
description: 'Use ChatGPT to provide text outputs in response to inputs',
skipHelp: true,
},
];
}
Expand Down

0 comments on commit 6695a4e

Please sign in to comment.