Skip to content

Commit

Permalink
Remove unintended code (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
abitofevrything authored Nov 26, 2023
1 parent 4890a02 commit 0bcfc0e
Showing 1 changed file with 2 additions and 51 deletions.
53 changes: 2 additions & 51 deletions example/example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,60 +114,11 @@ void main() async {
// Since a ping command doesn't have any other arguments, we don't add any other parameters to
// the function.
options: CommandOptions(defaultResponseLevel: ResponseLevel.hint),
id('ping', (ChatContext context) async {
id('ping', (ChatContext context) {
// For a ping command, all we need to do is respond with `pong`.
// To do that, we can use the `IChatContext`'s `respond` method which responds to the command with
// a message.
// context.respond(MessageBuilder(content: 'pong!'));

final level1 = ResponseLevel(
hideInteraction: true,
isDm: false,
mention: false,
preserveComponentMessages: true,
);
final level2 = ResponseLevel(
hideInteraction: true,
isDm: false,
mention: false,
preserveComponentMessages: false,
);
final level3 = ResponseLevel(
hideInteraction: false,
isDm: false,
mention: false,
preserveComponentMessages: true,
);
final level4 = ResponseLevel(
hideInteraction: false,
isDm: false,
mention: false,
preserveComponentMessages: false,
);
final levels = [level1, level2, level3, level4];

for (final level in levels) {
await context.getButtonSelection(
[1, 2, 3],
MessageBuilder(content: 'test'),
level: level,
);
await context.getSelection(
[1, 2, 3],
MessageBuilder(content: 'test'),
level: level,
);
await context.getSelection(
List.generate(50, (index) => index),
MessageBuilder(content: 'test'),
level: level,
);
await context.getMultiSelection(
[1, 2, 3],
MessageBuilder(content: 'test'),
level: level,
);
}
context.respond(MessageBuilder(content: 'pong!'));
}),
);

Expand Down

0 comments on commit 0bcfc0e

Please sign in to comment.