Twentysix26 / 26-Cogs

General purpose cogs for Red (v2)
GNU General Public License v3.0
26 stars 43 forks source link

[rndstatus.py] Bot status is working again #31

Closed regisssty closed 7 years ago

regisssty commented 7 years ago

Tried to make a little changes and bot status is working again! From rndstatus.py

Old: if self.last_change == None: #first run self.last_change = int(time.perf_counter()) if len(self.statuses) > 0 and (current_game in self.statuses or current_game == "None"): new_game = self.random_status(message) await self.bot.change_presence(game=discord.Game(name=new_game), status=current_status)

New: if self.last_change == None: #first run self.last_change = int(time.perf_counter()) if len(self.statuses) > 0 and (current_game in self.statuses or current_game == "None"): new_game = self.random_status(message) await self.bot.change_presence(game=discord.Game(type=0, name=new_game), status=current_status)

and

Old: if new_game != None: if current_game != new_game: if current_game in self.statuses or current_game == "None": #Prevents rndstatus from overwriting song's titles or await self.bot.change_presence(game=discord.Game(name=new_game), status=current_status) #custom statuses set with !set status

New: if new_game != None: if current_game != new_game: if current_game in self.statuses or current_game == "None": #Prevents rndstatus from overwriting song's titles or await self.bot.change_presence(game=discord.Game(type=0, name=new_game), status=current_status) #custom statuses set with !set status

skeith commented 7 years ago

Even without editing the cog, rndstatus just works. You just need to update your bot requirements, then it will work

MiniJennJenn commented 7 years ago

announcements on the discord channel ;)

Twentysix - Last Thursday at 7:55 AM Updating the requirements from the launcher should fix the status issue