barebones prototype
This commit is contained in:
parent
83f340ea01
commit
b53d33584c
60 changed files with 3743 additions and 1 deletions
28
addons/discord_gd/classes/message_flags.gd
Normal file
28
addons/discord_gd/classes/message_flags.gd
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
class_name MessageFlags extends BitField
|
||||
"""
|
||||
Represents a bitfield of Discord message flags.
|
||||
"""
|
||||
|
||||
func _init(bits = default_bit):
|
||||
default_bit = 0
|
||||
|
||||
if bits == null:
|
||||
bits = default_bit
|
||||
|
||||
FLAGS = {
|
||||
'CROSSPOSTED': 1 << 0,
|
||||
'IS_CROSSPOST': 1 << 1,
|
||||
'SUPPRESS_EMBEDS': 1 << 2,
|
||||
'SOURCE_MESSAGE_DELETED': 1 << 3,
|
||||
'URGENT': 1 << 4,
|
||||
'HAS_THREAD': 1 << 5,
|
||||
'EPHEMERAL': 1 << 6,
|
||||
'LOADING': 1 << 7,
|
||||
}
|
||||
|
||||
bitfield = resolve(bits)
|
||||
|
||||
|
||||
func missing(bits):
|
||||
var BF = load('res://addons/discord_gd/classes/message_flags.gd')
|
||||
return BF.new(bits).remove(self).to_array()
|
||||
Loading…
Add table
Add a link
Reference in a new issue