def _join(self, ctx, *, call_line: str):
"""Joins/creates a call-line between channels"""
call_line = call_line.lower()
if call_line == 'random':
if len(self.call_lines) != 0:
findcall = random.choice(list(self.call_lines))
await self.call_lines[findcall].addChannel(ctx.message.channel)
else:
await self.bot.say("There are no call-lines open! You can make your own call-line with `&call join <name>`")
else:
findcall = self.call_lines.get(call_line)
if findcall is None:
self.call_lines[call_line] = CallLine(
self.bot, ctx.message, call_line)
await self.bot.say("Connected to call-line `{}`".format(call_line))
else:
await findcall.addChannel(ctx.message.channel)
评论列表
文章目录