This commit is contained in:
Alex 2021-05-21 14:29:51 -05:00
parent 9293af28dc
commit 5b808e8873
3 changed files with 17 additions and 19 deletions

View File

@ -28,18 +28,17 @@ void main(List<String> arguments) {
..registerCommand( ..registerCommand(
'ping', 'ping',
(context, message) => { (context, message) => {
context.reply( context.reply(MessageBuilder.content('pong! ' +
content: 'pong! ' + bot.shardManager.shards
bot.shardManager.shards .elementAt(context.shardId)
.elementAt(context.shardId) .gatewayLatency
.gatewayLatency .inMilliseconds
.inMilliseconds .toString() +
.toString() + 'ms'))
'ms')
}) })
..registerCommand('info', (context, message) async { ..registerCommand('info', (context, message) async {
await context.sendMessage( await context.sendMessage(MessageBuilder.embed(
embed: await infoCommand(bot, context.guild, context.shardId)); await infoCommand(bot, context.guild, context.shardId)));
}); });
} }
@ -107,7 +106,6 @@ Future<EmbedBuilder> infoCommand(Nyxx bot, Guild? guild, int? shardId) async {
Future<void> infoSlashCommand(InteractionEvent event, Nyxx bot) async { Future<void> infoSlashCommand(InteractionEvent event, Nyxx bot) async {
await event.acknowledge(); await event.acknowledge();
await event.respond( await event.respond(MessageBuilder.embed(await infoCommand(
embed: await infoCommand( bot, await event.interaction.guild!.getOrDownload(), null)));
bot, await event.interaction.guild!.getOrDownload(), null));
} }

View File

@ -7,7 +7,7 @@ packages:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.6.1" version: "2.7.0"
charcode: charcode:
dependency: transitive dependency: transitive
description: description:
@ -56,21 +56,21 @@ packages:
name: nyxx name: nyxx
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0-rc.3" version: "2.0.0-rc.5"
nyxx_commander: nyxx_commander:
dependency: "direct main" dependency: "direct main"
description: description:
name: nyxx_commander name: nyxx_commander
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0-rc.5" version: "2.0.0-rc.8"
nyxx_interactions: nyxx_interactions:
dependency: "direct main" dependency: "direct main"
description: description:
name: nyxx_interactions name: nyxx_interactions
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0-rc.5" version: "2.0.0-rc.6"
path: path:
dependency: "direct main" dependency: "direct main"
description: description:
@ -114,4 +114,4 @@ packages:
source: hosted source: hosted
version: "1.3.0" version: "1.3.0"
sdks: sdks:
dart: ">=2.12.0 <2.13.0" dart: ">=2.12.0 <3.0.0"

View File

@ -8,7 +8,7 @@ environment:
dependencies: dependencies:
nyxx: ^2.0.0-rc.3 nyxx: ^2.0.0-rc.5
nyxx_interactions: ^2.0.0-rc.5 nyxx_interactions: ^2.0.0-rc.5
nyxx_commander: ^2.0.0-rc.5 nyxx_commander: ^2.0.0-rc.5
path: ^1.7.0 path: ^1.7.0