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

Renamed royaldiscord.py

This commit is contained in:
Steffo 2017-03-29 11:23:20 +02:00
parent 9d3e5674ab
commit 934ed55e3e
2 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@ import json
import random import random
import aiohttp import aiohttp
import async_timeout import async_timeout
import royaldiscord import extradiscord
import markovify import markovify
import database import database
import royalbotconfig import royalbotconfig
@ -12,7 +12,7 @@ import telegram
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()
b = telegram.Bot(royalbotconfig.telegram_token) b = telegram.Bot(royalbotconfig.telegram_token)
d = royaldiscord.ExtraClient(royalbotconfig.discord_token) d = extradiscord.ExtraClient(royalbotconfig.discord_token)
def currently_logged_in(thing): def currently_logged_in(thing):
@ -23,7 +23,7 @@ def currently_logged_in(thing):
if isinstance(thing, telegram.Update): if isinstance(thing, telegram.Update):
user = session.query(database.User).filter_by(telegram_id=thing.message.sent_from.user_id).first() user = session.query(database.User).filter_by(telegram_id=thing.message.sent_from.user_id).first()
# Check if thing is a Discord message # Check if thing is a Discord message
elif isinstance(thing, royaldiscord.discord.Message): elif isinstance(thing, extradiscord.discord.Message):
user = session.query(database.User).filter_by(discord_id=thing.author.id).first() user = session.query(database.User).filter_by(discord_id=thing.author.id).first()
# I don't know what thing is. # I don't know what thing is.
else: else: