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

You cannot change default notifications setting #4074

Closed
3 tasks done
kpodp0ra opened this issue May 7, 2020 · 1 comment
Closed
3 tasks done

You cannot change default notifications setting #4074

kpodp0ra opened this issue May 7, 2020 · 1 comment
Milestone

Comments

@kpodp0ra
Copy link

kpodp0ra commented May 7, 2020

Summary

You cannot change default notifications setting.

Reproduction Steps

await guild.edit(default_notifications=NotificationLevel.only_mentions)

No error is shown but the debugger detects:

Ignoring exception in on_message
Traceback (most recent call last):
  File "/home/kacper/.local/share/virtualenvs/arwatbot-68U9yBdw/lib/python3.8/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "/home/kacper/PycharmProjects/arwatbot/maker.py", line 73, in on_message
    await msg.guild.edit(default_notifications=NotificationLevel.only_mentions)
  File "/home/kacper/.local/share/virtualenvs/arwatbot-68U9yBdw/lib/python3.8/site-packages/discord/guild.py", line 1053, in edit
    default_message_notifications = int(fields.pop('default_notifications'))
TypeError: int() argument must be a string, a bytes-like object or a number, not '_EnumValue_NotificationLevel'

Expected Results

Notification level should change

Actual Results

Nothing happens

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 May 7, 2020

Fixed in #4047

@kpodp0ra kpodp0ra closed this as completed May 7, 2020
@Rapptz Rapptz added this to the 1.4 milestone May 8, 2020
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

No branches or pull requests

3 participants