Skip to content

only report unexpected ServerLinkNotFound to sentry#31

Open
HolsterJr10 wants to merge 4 commits into
ERM-Systems:Developmentfrom
HolsterJr10:fix-sentry-server-link-noise
Open

only report unexpected ServerLinkNotFound to sentry#31
HolsterJr10 wants to merge 4 commits into
ERM-Systems:Developmentfrom
HolsterJr10:fix-sentry-server-link-noise

Conversation

@HolsterJr10

Copy link
Copy Markdown

not-linked errors were flooding sentry (699 hits)

Comment thread utils/autocompletes.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commands should have @commands.guild_only() decorators on them. There's no reason to do this.

Comment thread menus.py
Comment on lines +11655 to +11660
member = interaction.guild.get_member(user_id)
if not member:
try:
member = await interaction.guild.fetch_member(user_id)
except discord.NotFound:
continue

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
member = interaction.guild.get_member(user_id)
if not member:
try:
member = await interaction.guild.fetch_member(user_id)
except discord.NotFound:
continue
try:
member = interaction.guild.get_member(user_id) or await interaction.guild.fetch_member(user_id)
except discord.NotFound:
continue

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 this pull request may close these issues.

2 participants