Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Busty doesn't seem to change her name back to the original string after a bust #20

Closed
anoadragon453 opened this issue Jan 15, 2022 · 1 comment · Fixed by #21
Closed
Assignees

Comments

@anoadragon453
Copy link
Owner

#8 added a feature where the bot would change their name to that of the currently playing song. When all songs had finished playing, or an admin calls !stop, the bot should change it's name back to what it was called originally.

While that did seem to work in testing that PR at the time, the functionality seems to have broken along the way. The bot's name does not change after the final song finishes playing, nor when an admin calls !stop, leaving the bot's name as that of the last played song.

@anoadragon453
Copy link
Owner Author

This turned out to be caused by this line:

busty/main.py

Line 156 in ae00e92

original_bot_nickname = bot_member.nick

bot_member.nick will be None if the bot does not has a guild-specific nickname set. If original_bot_nickname was None, operations such as:

busty/main.py

Lines 110 to 113 in ae00e92

# Restore the bot's original nick (if it exists)
if original_bot_nickname and current_channel:
bot_member = current_channel.guild.get_member(client.user.id)
await bot_member.edit(nick=original_bot_nickname)

would not fire.

Ensuring original_bot_nickname is set correctly will avoid this error. This is fixed in #21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant