nyxx.interactions pubspec changes & improvements
This commit is contained in:
parent
d59ec1ed07
commit
102650c81c
|
@ -55,13 +55,8 @@ class Interactions {
|
|||
if (!registeredOnly) {
|
||||
return _commands;
|
||||
}
|
||||
final registeredCommands = List<SlashCommand>.empty(growable: true);
|
||||
for (final command in _commands) {
|
||||
if (command.isRegistered) {
|
||||
registeredCommands.add(command);
|
||||
}
|
||||
}
|
||||
return registeredCommands;
|
||||
|
||||
return _commands.where((command) => command.isRegistered).toList();
|
||||
}
|
||||
|
||||
/// Syncs the local commands with the discord API
|
||||
|
|
|
@ -12,9 +12,9 @@ class InteractionEvent {
|
|||
|
||||
InteractionEvent._new(Nyxx client, Map<String, dynamic> rawJson) {
|
||||
this._client = client;
|
||||
interaction = Interaction._new(client, rawJson);
|
||||
this.interaction = Interaction._new(client, rawJson);
|
||||
|
||||
if (interaction.type == 1) {
|
||||
if (this.interaction.type == 1) {
|
||||
this._pong();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: nyxx_interactions
|
||||
version: 1.1.0-dev.2
|
||||
version: 1.1.0-dev.1
|
||||
authors:
|
||||
- HarryET
|
||||
description: Interactions for Nyxx library
|
||||
|
@ -9,18 +9,12 @@ documentation: https://github.com/l7ssha/nyxx/wiki
|
|||
issue_tracker: https://github.com/l7ssha/nyxx/issue
|
||||
|
||||
environment:
|
||||
sdk: '>=2.12.0-51.0.dev <3.0.0'
|
||||
sdk: ">=2.12.0-51.0.dev <3.0.0"
|
||||
|
||||
dependencies:
|
||||
logging: "^1.0.0-nullsafety.0"
|
||||
nyxx: "^1.1.0-dev.2"
|
||||
|
||||
dependency_overrides:
|
||||
http:
|
||||
git:
|
||||
url: git://github.com/dart-lang/http.git
|
||||
http_parser:
|
||||
git:
|
||||
url: git://github.com/dart-lang/http_parser.git
|
||||
nyxx:
|
||||
path: "../nyxx"
|
||||
|
|
Loading…
Reference in a new issue