1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Bugfix in telegram.py

This commit is contained in:
Steffo 2019-03-18 09:44:30 +01:00
parent 2b2432b4d5
commit 3f9e2a229c

View file

@ -1,7 +1,6 @@
import telegram import telegram
import asyncio import asyncio
import typing import typing
import multiprocessing
from ..commands import NullCommand from ..commands import NullCommand
from ..utils import asyncify, Call, Command from ..utils import asyncify, Call, Command
from ..network import RoyalnetLink, Message from ..network import RoyalnetLink, Message
@ -71,7 +70,7 @@ class TelegramBot:
command_text.replace(f"@{self.bot.username}", "") command_text.replace(f"@{self.bot.username}", "")
# Find the function # Find the function
try: try:
command = self._commands[command_text] command = self.commands[command_text]
except KeyError: except KeyError:
# Skip inexistent commands # Skip inexistent commands
command = self.missing_command command = self.missing_command