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

Time:05-31

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

CodePudding user response:

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

  • Related