Commit 6bfd57b8 authored by Armando Lüscher's avatar Armando Lüscher

Replace all forgotten `getBotName` methods with new `getBotUsername`.

parent abbb3e62
......@@ -64,7 +64,7 @@ class HelpCommand extends UserCommand
if ($command === '') {
$text = sprintf(
'%s v. %s' . PHP_EOL . PHP_EOL . 'Commands List:' . PHP_EOL,
$this->telegram->getBotName(),
$this->telegram->getBotUsername(),
$this->telegram->getVersion()
);
......
......@@ -203,7 +203,7 @@ class SendtochannelCommand extends AdminCommand
if ($notes['set_caption']) {
$data['caption'] = $notes['caption'];
}
$this->sendBack(new Message($notes['message'], $this->telegram->getBotName()), $data);
$this->sendBack(new Message($notes['message'], $this->telegram->getBotUsername()), $data);
$data['reply_markup'] = new Keyboard(
[
......@@ -231,7 +231,7 @@ class SendtochannelCommand extends AdminCommand
if ($notes['post_message']) {
$data['text'] = $this->publish(
new Message($notes['message'], $this->telegram->getBotName()),
new Message($notes['message'], $this->telegram->getBotUsername()),
$notes['channel'],
$notes['caption']
);
......@@ -350,7 +350,7 @@ class SendtochannelCommand extends AdminCommand
$channels = (array) $this->getConfig('your_channel');
$first_channel = $channels[0];
$data['text'] = $this->publish(
new Message($message->getRawData(), $this->telegram->getBotName()),
new Message($message->getRawData(), $this->telegram->getBotUsername()),
$first_channel
);
}
......
......@@ -183,7 +183,7 @@ class Message extends Entity
$split_cmd = explode('@', $full_command);
if (isset($split_cmd[1])) {
//command is followed by name check if is addressed to me
if (strtolower($split_cmd[1]) === strtolower($this->getBotName())) {
if (strtolower($split_cmd[1]) === strtolower($this->getBotUsername())) {
return $split_cmd[0];
}
} else {
......@@ -226,7 +226,7 @@ class Message extends Entity
{
$member = $this->getNewChatMember();
return $member !== null && $member->getUsername() === $this->getBotName();
return $member !== null && $member->getUsername() === $this->getBotUsername();
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment