From 5b808e8873cc30cf4ad52261e5b0fd4528d5d733 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 21 May 2021 14:29:51 -0500 Subject: [PATCH] Updated --- bin/osselbot.dart | 24 +++++++++++------------- pubspec.lock | 10 +++++----- pubspec.yaml | 2 +- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/bin/osselbot.dart b/bin/osselbot.dart index 5e88107..c578474 100644 --- a/bin/osselbot.dart +++ b/bin/osselbot.dart @@ -28,18 +28,17 @@ void main(List arguments) { ..registerCommand( 'ping', (context, message) => { - context.reply( - content: 'pong! ' + - bot.shardManager.shards - .elementAt(context.shardId) - .gatewayLatency - .inMilliseconds - .toString() + - 'ms') + context.reply(MessageBuilder.content('pong! ' + + bot.shardManager.shards + .elementAt(context.shardId) + .gatewayLatency + .inMilliseconds + .toString() + + 'ms')) }) ..registerCommand('info', (context, message) async { - await context.sendMessage( - embed: await infoCommand(bot, context.guild, context.shardId)); + await context.sendMessage(MessageBuilder.embed( + await infoCommand(bot, context.guild, context.shardId))); }); } @@ -107,7 +106,6 @@ Future infoCommand(Nyxx bot, Guild? guild, int? shardId) async { Future infoSlashCommand(InteractionEvent event, Nyxx bot) async { await event.acknowledge(); - await event.respond( - embed: await infoCommand( - bot, await event.interaction.guild!.getOrDownload(), null)); + await event.respond(MessageBuilder.embed(await infoCommand( + bot, await event.interaction.guild!.getOrDownload(), null))); } diff --git a/pubspec.lock b/pubspec.lock index b6b41d2..7e75b96 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.7.0" charcode: dependency: transitive description: @@ -56,21 +56,21 @@ packages: name: nyxx url: "https://pub.dartlang.org" source: hosted - version: "2.0.0-rc.3" + version: "2.0.0-rc.5" nyxx_commander: dependency: "direct main" description: name: nyxx_commander url: "https://pub.dartlang.org" source: hosted - version: "2.0.0-rc.5" + version: "2.0.0-rc.8" nyxx_interactions: dependency: "direct main" description: name: nyxx_interactions url: "https://pub.dartlang.org" source: hosted - version: "2.0.0-rc.5" + version: "2.0.0-rc.6" path: dependency: "direct main" description: @@ -114,4 +114,4 @@ packages: source: hosted version: "1.3.0" sdks: - dart: ">=2.12.0 <2.13.0" + dart: ">=2.12.0 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index c5500fe..bf3bf6a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,7 +8,7 @@ environment: dependencies: - nyxx: ^2.0.0-rc.3 + nyxx: ^2.0.0-rc.5 nyxx_interactions: ^2.0.0-rc.5 nyxx_commander: ^2.0.0-rc.5 path: ^1.7.0