Game: replaced logging.debug with logger.debug

This commit is contained in:
Elnath 2021-06-20 21:10:09 +02:00
parent b92ab9ce2f
commit daa2a094f2
1 changed files with 4 additions and 4 deletions

View File

@ -340,7 +340,7 @@ class Game:
async def start_vote(self, president: discord.Member, chancellor: discord.Member):
if self.is_vote_running():
raise RuntimeError("A vote is already running")
logging.debug(f"[{self.guild.name}] Starting vote")
logger.debug(f"[{self.guild.name}] Starting vote")
self.config["vote"] = {
"president": president.id,
@ -354,7 +354,7 @@ class Game:
@vote_running
async def update_vote_message(self):
logging.debug(f"[{self.guild.name}] Updating vote message")
logger.debug(f"[{self.guild.name}] Updating vote message")
president = self.config["vote"]["president"]
chancellor = self.config["vote"]["chancellor"]
message_content = [
@ -392,7 +392,7 @@ class Game:
@vote_running
@save_on_success
async def cast_vote(self, user: discord.Member, vote: Union[bool, None]):
logging.debug(f"[{self.guild.name}] Casting vote with value {vote} for user {user.display_name}")
logger.debug(f"[{self.guild.name}] Casting vote with value {vote} for user {user.display_name}")
if not self.can_cast_votes():
raise RuntimeError("Votes can not be casted right now")
self.config["vote"][str(user.id)] = vote
@ -403,7 +403,7 @@ class Game:
@vote_running
@save_on_success
async def stop_vote(self):
logging.debug(f"[{self.guild.name}] Stopping the vote")
logger.debug(f"[{self.guild.name}] Stopping the vote")
self.config["vote"]["can_cast_votes"] = False
self.config["vote"]["revealed"] = True
await self.update_vote_message()