implement guild stickers
This commit is contained in:
@@ -46,6 +46,7 @@ __all__ = (
|
||||
'ExpireBehaviour',
|
||||
'ExpireBehavior',
|
||||
'StickerType',
|
||||
'StickerFormatType',
|
||||
'InviteTarget',
|
||||
'VideoQualityMode',
|
||||
'ComponentType',
|
||||
@@ -346,6 +347,9 @@ class AuditLogAction(Enum):
|
||||
stage_instance_create = 83
|
||||
stage_instance_update = 84
|
||||
stage_instance_delete = 85
|
||||
sticker_create = 90
|
||||
sticker_update = 91
|
||||
sticker_delete = 92
|
||||
thread_create = 110
|
||||
thread_update = 111
|
||||
thread_delete = 112
|
||||
@@ -393,6 +397,9 @@ class AuditLogAction(Enum):
|
||||
AuditLogAction.stage_instance_create: AuditLogActionCategory.create,
|
||||
AuditLogAction.stage_instance_update: AuditLogActionCategory.update,
|
||||
AuditLogAction.stage_instance_delete: AuditLogActionCategory.delete,
|
||||
AuditLogAction.sticker_create: AuditLogActionCategory.create,
|
||||
AuditLogAction.sticker_update: AuditLogActionCategory.update,
|
||||
AuditLogAction.sticker_delete: AuditLogActionCategory.delete,
|
||||
AuditLogAction.thread_create: AuditLogActionCategory.create,
|
||||
AuditLogAction.thread_update: AuditLogActionCategory.update,
|
||||
AuditLogAction.thread_delete: AuditLogActionCategory.delete,
|
||||
@@ -427,6 +434,8 @@ class AuditLogAction(Enum):
|
||||
return 'integration'
|
||||
elif v < 90:
|
||||
return 'stage_instance'
|
||||
elif v < 93:
|
||||
return 'sticker'
|
||||
elif v < 113:
|
||||
return 'thread'
|
||||
|
||||
@@ -484,10 +493,26 @@ ExpireBehavior = ExpireBehaviour
|
||||
|
||||
|
||||
class StickerType(Enum):
|
||||
standard = 1
|
||||
guild = 2
|
||||
|
||||
|
||||
class StickerFormatType(Enum):
|
||||
png = 1
|
||||
apng = 2
|
||||
lottie = 3
|
||||
|
||||
@property
|
||||
def file_extension(self) -> str:
|
||||
# fmt: off
|
||||
lookup: Dict[StickerFormatType, str] = {
|
||||
StickerFormatType.png: 'png',
|
||||
StickerFormatType.apng: 'png',
|
||||
StickerFormatType.lottie: 'json',
|
||||
}
|
||||
# fmt: on
|
||||
return lookup[self]
|
||||
|
||||
|
||||
class InviteTarget(Enum):
|
||||
unknown = 0
|
||||
|
||||
Reference in New Issue
Block a user