mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 22:37:54 +00:00
feat(bot): allow separate member avatars for proxied messages (#523)
This allows for using one avatar for the member card, and a different avatar for proxied messages - so that users can set the main avatar to a "full" version of their avatar, and the "proxy" avatar to a cropped version.
This commit is contained in:
parent
7fffb7f65a
commit
ccb89f50e9
12 changed files with 138 additions and 49 deletions
|
|
@ -1,4 +1,4 @@
|
|||
create function message_context(account_id bigint, guild_id bigint, channel_id bigint)
|
||||
create function message_context(account_id bigint, guild_id bigint, channel_id bigint)
|
||||
returns table (
|
||||
system_id int,
|
||||
log_channel bigint,
|
||||
|
|
@ -67,6 +67,7 @@ create function proxy_members(account_id bigint, guild_id bigint)
|
|||
name text,
|
||||
|
||||
server_avatar text,
|
||||
webhook_avatar text,
|
||||
avatar text,
|
||||
|
||||
color char(6),
|
||||
|
|
@ -76,22 +77,23 @@ create function proxy_members(account_id bigint, guild_id bigint)
|
|||
as $$
|
||||
select
|
||||
-- Basic data
|
||||
members.id as id,
|
||||
members.proxy_tags as proxy_tags,
|
||||
members.keep_proxy as keep_proxy,
|
||||
members.id as id,
|
||||
members.proxy_tags as proxy_tags,
|
||||
members.keep_proxy as keep_proxy,
|
||||
|
||||
-- Name info
|
||||
member_guild.display_name as server_name,
|
||||
members.display_name as display_name,
|
||||
members.name as name,
|
||||
member_guild.display_name as server_name,
|
||||
members.display_name as display_name,
|
||||
members.name as name,
|
||||
|
||||
-- Avatar info
|
||||
member_guild.avatar_url as server_avatar,
|
||||
members.avatar_url as avatar,
|
||||
member_guild.avatar_url as server_avatar,
|
||||
members.webhook_avatar_url as webhook_avatar,
|
||||
members.avatar_url as avatar,
|
||||
|
||||
members.color as color,
|
||||
members.color as color,
|
||||
|
||||
members.allow_autoproxy as allow_autoproxy
|
||||
members.allow_autoproxy as allow_autoproxy
|
||||
from accounts
|
||||
inner join systems on systems.id = accounts.system
|
||||
inner join members on members.system = systems.id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue