mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Prevent update msg when no message exists
This commit is contained in:
parent
ba7b47f193
commit
b43d29bca5
@ -68,8 +68,9 @@ class DatabaseInterface(object):
|
|||||||
.filter(Messages.guild_id == message.server.id) \
|
.filter(Messages.guild_id == message.server.id) \
|
||||||
.filter(Messages.channel_id == message.channel.id) \
|
.filter(Messages.channel_id == message.channel.id) \
|
||||||
.filter(Messages.message_id == message.id).first()
|
.filter(Messages.message_id == message.id).first()
|
||||||
msg.content = message.content
|
if msg:
|
||||||
msg.edited_timestamp = message.edited_timestamp
|
msg.content = message.content
|
||||||
msg.mentions = json.dumps(message.mentions)
|
msg.edited_timestamp = message.edited_timestamp
|
||||||
msg.attachments = json.dumps(message.attachments)
|
msg.mentions = json.dumps(message.mentions)
|
||||||
session.commit()
|
msg.attachments = json.dumps(message.attachments)
|
||||||
|
session.commit()
|
||||||
|
Loading…
Reference in New Issue
Block a user