-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from nyxx-discord/feature/poop-service-extension
feature: Extend pooping service; Add system command
- Loading branch information
Showing
10 changed files
with
102 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import 'package:nyxx/nyxx.dart'; | ||
import 'package:nyxx_commands/nyxx_commands.dart'; | ||
import 'package:running_on_dart/running_on_dart.dart'; | ||
import 'package:running_on_dart/src/checks.dart'; | ||
|
||
ChatGroup system = ChatGroup( | ||
'system', | ||
'Commands designed for ROD administrators', | ||
children: [ | ||
ChatCommand( | ||
"clear-cache", | ||
"Clear bot cache", | ||
id("clear-cache", (IChatContext context) async { | ||
context.client.channels.clear(); | ||
context.client.users.clear(); | ||
|
||
await context.respond(MessageBuilder.content("Cache cleared successfully!")); | ||
}) | ||
) | ||
], | ||
checks: [ | ||
administratorCheck, | ||
GuildCheck.id(adminGuildId) | ||
], | ||
options: CommandOptions(hideOriginalResponse: true) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters