File tree 2 files changed +24
-0
lines changed
src/Console/Commands/stubs
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace {{ namespace }};
4
4
5
+ use Discord\Parts\Interactions\Interaction;
5
6
use Laracord\Commands\Command;
6
7
7
8
class {{ class }} extends Command
@@ -47,6 +48,17 @@ class {{ class }} extends Command
47
48
->message()
48
49
->title('{{ class }}')
49
50
->content('Hello world!')
51
+ ->button('π', route: 'wave')
50
52
->send($message);
51
53
}
54
+
55
+ /**
56
+ * The command interaction routes.
57
+ */
58
+ public function interactions(): array
59
+ {
60
+ return [
61
+ 'wave' => fn (Interaction $interaction) => $this->message('π')->reply($interaction),
62
+ ];
63
+ }
52
64
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace {{ namespace }};
4
4
5
+ use Discord\Parts\Interactions\Interaction;
5
6
use Laracord\Commands\SlashCommand;
6
7
7
8
class {{ class }} extends SlashCommand
@@ -61,7 +62,18 @@ class {{ class }} extends SlashCommand
61
62
->message()
62
63
->title('{{ class }}')
63
64
->content('Hello world!')
65
+ ->button('π', route: 'wave')
64
66
->build()
65
67
);
66
68
}
69
+
70
+ /**
71
+ * The command interaction routes.
72
+ */
73
+ public function interactions(): array
74
+ {
75
+ return [
76
+ 'wave' => fn (Interaction $interaction) => $this->message('π')->reply($interaction),
77
+ ];
78
+ }
67
79
}
You canβt perform that action at this time.
0 commit comments