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")
CodePudding user response:
A Guild's notification level can be found through the Guild.default_notifications
attribute. This will return a NotificationLevel
object.