Add songs playing to info embed
This commit is contained in:
parent
6dcaf2ef99
commit
bd7b5a5ca5
45
cogs/misc.py
45
cogs/misc.py
|
@ -182,26 +182,35 @@ class Miscallaneous:
|
||||||
# Add the normal values
|
# Add the normal values
|
||||||
embed.add_field(name='Total Servers', value=len(self.bot.guilds))
|
embed.add_field(name='Total Servers', value=len(self.bot.guilds))
|
||||||
embed.add_field(name='Total Members', value=len(self.bot.users))
|
embed.add_field(name='Total Members', value=len(self.bot.users))
|
||||||
|
hm = self.bot.get_cog('Hangman')
|
||||||
|
ttt = self.bot.get_cog('TicTacToe')
|
||||||
|
bj = self.bot.get_cog('Blackjack')
|
||||||
|
interaction = self.bot.get_cog('Blackjack')
|
||||||
|
music = self.bot.get_cog('Music')
|
||||||
|
|
||||||
# Count the variable values; hangman, tictactoe, etc.
|
# Count the variable values; hangman, tictactoe, etc.
|
||||||
hm_games = len(self.bot.get_cog('Hangman').games)
|
if hm:
|
||||||
|
hm_games = len(hm.games)
|
||||||
ttt_games = len(self.bot.get_cog('TicTacToe').boards)
|
if hm_games:
|
||||||
|
embed.add_field(name='Total Hangman games running', value=hm_games)
|
||||||
bj_games = len(self.bot.get_cog('Blackjack').games)
|
if ttt:
|
||||||
|
ttt_games = len(ttt.boards)
|
||||||
count_battles = 0
|
if ttt_games:
|
||||||
for battles in self.bot.get_cog('Interaction').battles.values():
|
embed.add_field(name='Total TicTacToe games running', value=ttt_games)
|
||||||
count_battles += len(battles)
|
if bj:
|
||||||
|
bj_games = len(bj.games)
|
||||||
if hm_games:
|
if bj_games:
|
||||||
embed.add_field(name='Total Hangman games running', value=hm_games)
|
embed.add_field(name='Total blackjack games running', value=bj_games)
|
||||||
if ttt_games:
|
if interaction:
|
||||||
embed.add_field(name='Total TicTacToe games running', value=ttt_games)
|
count_battles = 0
|
||||||
if count_battles:
|
for battles in self.bot.get_cog('Interaction').battles.values():
|
||||||
embed.add_field(name='Total battles games running', value=count_battles)
|
count_battles += len(battles)
|
||||||
if bj_games:
|
if count_battles:
|
||||||
embed.add_field(name='Total blackjack games running', value=bj_games)
|
embed.add_field(name='Total battles games running', value=count_battles)
|
||||||
|
if music:
|
||||||
|
songs = len([x for x in music.voice_states.values() if x.playing])
|
||||||
|
if songs:
|
||||||
|
embed.add_field(name='Total songs playing', value=songs)
|
||||||
|
|
||||||
if hasattr(self.bot, 'uptime'):
|
if hasattr(self.bot, 'uptime'):
|
||||||
embed.add_field(name='Uptime', value=(pendulum.utcnow() - self.bot.uptime).in_words())
|
embed.add_field(name='Uptime', value=(pendulum.utcnow() - self.bot.uptime).in_words())
|
||||||
|
|
Loading…
Reference in a new issue