Skip to content

Commit 0c094dc

Browse files
committed
Allow 'beam' as a !social option
1 parent fd65c1f commit 0c094dc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

models.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,15 @@ def __init__(self, get_channel):
251251
self.get_channel = get_channel
252252

253253
def __call__(self, args, data=None):
254-
s = self.get_channel(data["channel"])["user"]["social"]
254+
channel_data = self.get_channel(data["channel"])
255+
name = channel_data["token"]
256+
s = channel_data["user"]["social"]
255257
a = [arg.lower() for arg in args[1:]]
256258
if s:
257259
if not a:
258260
return ', '.join(': '.join((k.title(), s[k])) for k in s)
259-
elif set(a).issubset(set(s)):
261+
elif set(a).issubset(set(s).union({"beam"})):
262+
s.update({"beam": "https://beam.pro/{}".format(name)})
260263
return ', '.join(': '.join((k.title(), s[k])) for k in a)
261264
return "Data not found for service{s}: {}.".format(
262265
', '.join(set(a) - set(s)), s='s'*(len(set(a) - set(s)) != 1))

0 commit comments

Comments
 (0)