Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

is there any way to get the guild's notification settings?

For example, whenever a user uses the !notification command, it should print in the console wether the server’s notification settings are set to "all messages" or "only @mentions".

Here is an idea of what i’d like to use it for.

@bot.command()
async def notification():
  notificationsettings = #notification settings here

  if notificationsettings == "only @mentions":
    print("You'll only get mention notifications")

  else:
    print("You'll get every message notifications")

image

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

A Guild’s notification level can be found through the Guild.default_notifications attribute. This will return a NotificationLevel object.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading