diff --git a/sopel/tools/_events.py b/sopel/tools/_events.py index c60628e03f..7f6df9623e 100644 --- a/sopel/tools/_events.py +++ b/sopel/tools/_events.py @@ -1,7 +1,9 @@ from __future__ import generator_stop +from enum import Enum -class events(object): + +class events(str, Enum): """An enumeration of all the standardized and notable IRC numeric events This allows you to do, for example, ``@plugin.event(events.RPL_WELCOME)`` @@ -79,7 +81,7 @@ class events(object): ERR_NOTREGISTERED = '451' ERR_NEEDMOREPARAMS = '461' ERR_ALREADYREGISTRED = '462' - ERR_ALREADYREGISTERED = '462' # corrected spelling used in some tutorials + ERR_ALREADYREGISTERED = ERR_ALREADYREGISTRED # corrected spelling used in some tutorials ERR_NOPERMFORHOST = '463' ERR_PASSWDMISMATCH = '464' ERR_YOUREBANNEDCREEP = '465'