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

discord.Guild.region not having value attribute in Europe #2417

Closed
3 tasks done
AlexFlipnote opened this issue Nov 11, 2019 · 3 comments
Closed
3 tasks done

discord.Guild.region not having value attribute in Europe #2417

AlexFlipnote opened this issue Nov 11, 2019 · 3 comments
Labels
duplicate This is a duplicate of another issue or PR.

Comments

@AlexFlipnote
Copy link

Summary

Whenever I try calling ctx.guild.region.value on a server with the region set to "Europe", it sends an error

Reproduction Steps

>>> ctx.guild.region.value

Expected Results

Return value of the region

Actual Results

  File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 898, in process_commands
    await self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 863, in invoke
    await ctx.command.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 721, in invoke
    await self.prepare(ctx)
  File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 687, in prepare
    await self.call_before_hooks(ctx)
  File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 643, in call_before_hooks
    await hook(ctx)
  File "/home/alexflipnote/Desktop/xelA/cogs/music.py", line 70, in cog_before_invoke
    await self.ensure_voice(ctx)
  File "/home/alexflipnote/Desktop/xelA/cogs/music.py", line 95, in ensure_voice
    player = self.bot.lavalink.player_manager.create(ctx.guild.id, endpoint=ctx.guild.region.value)
AttributeError: 'str' object has no attribute 'value'

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

System Information

@avayert
Copy link

avayert commented Nov 11, 2019

Seems to be fixed in master.

@AlexFlipnote
Copy link
Author

Yupp, worked to install through master branch on GitHub. Was using 1.2.4 as that was the latest discord.py package provided by pip. Thank you.

@Harmon758
Copy link
Contributor

In the future, please make sure you're using the latest development version when reporting issues.

@dpy-manager-bot dpy-manager-bot added the duplicate This is a duplicate of another issue or PR. label Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This is a duplicate of another issue or PR.
Projects
None yet
Development

No branches or pull requests

4 participants