Skip to content

Commit be36c6f

Browse files
committed
Merge branch 'develop' of https://www.github.com/CactusBot/CactusBot into develop
2 parents ae7e314 + b6d6045 commit be36c6f

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

cactus.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,6 @@ def _run(self, *args, **kwargs):
145145

146146
self.started = True
147147

148-
self.channel = self.get_channel(self.config["channel"])
149-
150148
self.channel = self.config["channel"]
151149
self.channel_data = self.get_channel(self.channel)
152150

models.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ class StoredCommand(Base):
3131
author = Column(Integer)
3232

3333

34+
class Quote(Base):
35+
__tablename__ = "quotes"
36+
37+
id = Column(Integer, unique=True, primary_key=True)
38+
39+
quote = Column(String)
40+
41+
creation = Column(DateTime)
42+
author = Column(Integer)
43+
44+
3445
class Command(StoredCommand, User):
3546
def __init__(self, *args, **kwargs):
3647
super(Command, self).__init__(*args, **kwargs)
@@ -59,17 +70,6 @@ def __call__(self, user, *args):
5970
return response
6071

6172

62-
class Quote(Base):
63-
__tablename__ = "quotes"
64-
65-
id = Column(Integer, unique=True, primary_key=True)
66-
67-
quote = Column(String)
68-
69-
creation = Column(DateTime)
70-
author = Column(Integer)
71-
72-
7373
class CommandCommand(Command):
7474
def __call__(self, args, data):
7575
mod_roles = ("Owner", "Staff", "Founder", "Global Mod", "Mod")
@@ -170,8 +170,7 @@ class SocialCommand(Command):
170170
user = User()
171171

172172
def __call__(self, args, data=None):
173-
social = self.user.request("GET", "/channels/{id}".format(
174-
id=data['channel']), fields='user')["user"]["social"]
173+
social = self.user.get_channel(data["channel"])["user"]["social"]
175174
if social:
176175
return ', '.join(': '.join((k.title(), social[k])) for k in social)
177176
return "No social services were found on the streamer's profile."

user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def get_channel(self, id, **p):
7676

7777
def get_chat(self, id):
7878
"""Get chat server data."""
79-
return self.request("GET", "/chats/{id}".format(id=id), params="")
79+
return self.request("GET", "/chats/{id}".format(id=id))
8080

8181
def connect(self, channel_id, bot_id):
8282
"""Connect to a Beam chat through a websocket."""

0 commit comments

Comments
 (0)