Skip to content

Commit

Permalink
Fix reminder commander command name
Browse files Browse the repository at this point in the history
  • Loading branch information
l7ssha committed Nov 7, 2021
1 parent 5b6ba42 commit 471ee7d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.5

- Fixup commander remind command name

## 2.1.4

- Docker compose build from Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion bin/running_on_dart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void main(List<String> arguments) async {
..registerSubCommand("search", rod.docsSearchCommand))
// Minor commands
..registerCommand("info", rod.infoCommand)
..registerCommand("remainder", rod.remainderCommand);
..registerCommand("remind", rod.reminderCommand);

Interactions(WebsocketInteractionBackend(botInstance))
..registerSlashCommand(SlashCommandBuilder("info", "Info about bot state", [])..registerHandler(rod.infoSlashCommand))
Expand Down
6 changes: 3 additions & 3 deletions lib/src/commands/legacy/reminder_legacy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ import "package:nyxx/nyxx.dart";
import "package:nyxx_commander/nyxx_commander.dart";
import "package:running_on_dart/src/modules/reminder/reminder.dart";

Future<void> remainderCommand(ICommandContext ctx, String content) async {
Future<void> reminderCommand(ICommandContext ctx, String content) async {
final argString = ctx.getArguments().join(" ");

if (argString.isEmpty) {
await ctx.reply(MessageBuilder.content("Provide duration when remainder should be triggered"));
await ctx.reply(MessageBuilder.content("Provide duration when reminder should be triggered"));
return;
}

final triggerDate = DateTime.now().add(parseStringToDuration(argString));
final replyMessage = ctx.message.referencedMessage?.message?.url;

if (replyMessage == null) {
await ctx.reply(MessageBuilder.content("Reply to message to create remainder"));
await ctx.reply(MessageBuilder.content("Reply to message to create reminder"));
return;
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: running_on_dart
version: 2.1.4
version: 2.1.5
description: Discord Bot for nyxx development
homepage: https://github.com/nyxx-discord/running_on_dart
repository: https://github.com/nyxx-discord/running_on_dart
Expand Down

0 comments on commit 471ee7d

Please sign in to comment.