Skip to content

Commit e2d7d58

Browse files
committed
Update | Beta 5.0.6
1 parent c73c219 commit e2d7d58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Model/Command/Command.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ abstract class Command
3535
*/
3636
public function __construct($bot, $command_name)
3737
{
38+
$this->bot = $bot;
3839
$bot->addDispatch('MESSAGE_CREATE', function ($json) use ($command_name, $bot) {
3940
$this->json = $json->d;
4041
if (str_starts_with($json->d->content, $bot->prefix . $command_name)) {
41-
$res = $this->execute($this->bot->channel->getMessage($this->bot->channel->getChannel($json->d->channel_id), intval($json->d->id)), $bot);
42+
$res = $this->execute($this->bot->channel->getMessage($bot->channel->getChannel($json->d->channel_id), intval($json->d->id)), $bot);
4243
if(isset(json_decode($res)->message)){
4344
$this->onFail(json_decode($res)->message, $this->bot);
4445
}

0 commit comments

Comments
 (0)