mirror of https://gitlab.com/litecord/litecord.git
litecord.storage: give pinned value
This commit is contained in:
parent
31042e4129
commit
eed4912440
|
|
@ -700,8 +700,13 @@ class Storage:
|
||||||
# TODO: res['embeds']
|
# TODO: res['embeds']
|
||||||
res['embeds'] = []
|
res['embeds'] = []
|
||||||
|
|
||||||
# TODO: res['pinned']
|
pin_id = await self.db.fetchval("""
|
||||||
res['pinned'] = False
|
SELECT message_id
|
||||||
|
FROM channel_pins
|
||||||
|
WHERE channel_id = $1 AND message_id = $2
|
||||||
|
""", channel_id, message_id)
|
||||||
|
|
||||||
|
res['pinned'] = pin_id is not None
|
||||||
|
|
||||||
# this is specifically for lazy guilds:
|
# this is specifically for lazy guilds:
|
||||||
# only insert when the channel
|
# only insert when the channel
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue