async def runTwitch(self, ctx): gid = ctx.guild.id globVars = util.globalVars() streamers = globVars.streamers botData = botClass(gid) if streamers.get(str(gid)) != None: processName = f'{twitchProcessName}-{gid}' twitchProcess = multiprocessing.Process(target=twitchBot.run, kwargs={ 'botClass': botData.twitchChannel, 'guildId': botData.guildId, 'dataQueue': self.shareData }, name=processName) twitchProcess.start() self.processes.append(processName) await ctx.send( f'Twitch Bot has been started on the channel "{streamers.get(str(gid))}"' ) else: await ctx.send( f'The guild {ctx.guild.name} does not have an associated twitch channel...' )
def getChannel(self): getGlob = util.globalVars() return getGlob.streamers.get(str(self.guildId))