mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-11 16:20:13 +00:00
fix(bot): generate and attach color previews
This commit is contained in:
parent
497bee9487
commit
3ad28eb15f
5 changed files with 47 additions and 15 deletions
|
|
@ -443,10 +443,11 @@ public class Groups
|
|||
await ctx.Reply(embed: new EmbedBuilder()
|
||||
.Title("Group color")
|
||||
.Color(target.Color.ToDiscordColor())
|
||||
.Thumbnail(new Embed.EmbedThumbnail($"https://fakeimg.pl/256x256/{target.Color}/?text=%20"))
|
||||
.Thumbnail(new Embed.EmbedThumbnail($"attachment://color.gif"))
|
||||
.Description($"This group's color is **#{target.Color}**."
|
||||
+ (isOwnSystem ? $" To clear it, type `{ctx.DefaultPrefix}group {target.Reference(ctx)} color -clear`." : ""))
|
||||
.Build());
|
||||
.Build(),
|
||||
files: [MiscUtils.GenerateColorPreview(target.Color)]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -471,8 +472,9 @@ public class Groups
|
|||
await ctx.Reply(embed: new EmbedBuilder()
|
||||
.Title($"{Emojis.Success} Group color changed.")
|
||||
.Color(color.ToDiscordColor())
|
||||
.Thumbnail(new Embed.EmbedThumbnail($"https://fakeimg.pl/256x256/{color}/?text=%20"))
|
||||
.Build());
|
||||
.Thumbnail(new Embed.EmbedThumbnail($"attachment://color.gif"))
|
||||
.Build(),
|
||||
files: [MiscUtils.GenerateColorPreview(color)]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -308,10 +308,11 @@ public class MemberEdit
|
|||
await ctx.Reply(embed: new EmbedBuilder()
|
||||
.Title("Member color")
|
||||
.Color(target.Color.ToDiscordColor())
|
||||
.Thumbnail(new Embed.EmbedThumbnail($"https://fakeimg.pl/256x256/{target.Color}/?text=%20"))
|
||||
.Thumbnail(new Embed.EmbedThumbnail($"attachment://color.gif"))
|
||||
.Description($"This member's color is **#{target.Color}**."
|
||||
+ (isOwnSystem ? $" To clear it, type `{ctx.DefaultPrefix}member {target.Reference(ctx)} color -clear`." : ""))
|
||||
.Build());
|
||||
.Build(),
|
||||
files: [MiscUtils.GenerateColorPreview(target.Color)]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -336,8 +337,9 @@ public class MemberEdit
|
|||
await ctx.Reply(embed: new EmbedBuilder()
|
||||
.Title($"{Emojis.Success} Member color changed.")
|
||||
.Color(color.ToDiscordColor())
|
||||
.Thumbnail(new Embed.EmbedThumbnail($"https://fakeimg.pl/256x256/{color}/?text=%20"))
|
||||
.Build());
|
||||
.Thumbnail(new Embed.EmbedThumbnail($"attachment://color.gif"))
|
||||
.Build(),
|
||||
files: [MiscUtils.GenerateColorPreview(color)]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -241,10 +241,11 @@ public class SystemEdit
|
|||
await ctx.Reply(embed: new EmbedBuilder()
|
||||
.Title("System color")
|
||||
.Color(target.Color.ToDiscordColor())
|
||||
.Thumbnail(new Embed.EmbedThumbnail($"https://fakeimg.pl/256x256/{target.Color}/?text=%20"))
|
||||
.Thumbnail(new Embed.EmbedThumbnail($"attachment://color.gif"))
|
||||
.Description(
|
||||
$"This system's color is **#{target.Color}**." + (isOwnSystem ? $" To clear it, type `{ctx.DefaultPrefix}s color -clear`." : ""))
|
||||
.Build());
|
||||
.Build(),
|
||||
files: [MiscUtils.GenerateColorPreview(target.Color)]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -269,8 +270,9 @@ public class SystemEdit
|
|||
await ctx.Reply(embed: new EmbedBuilder()
|
||||
.Title($"{Emojis.Success} System color changed.")
|
||||
.Color(color.ToDiscordColor())
|
||||
.Thumbnail(new Embed.EmbedThumbnail($"https://fakeimg.pl/256x256/{color}/?text=%20"))
|
||||
.Build());
|
||||
.Thumbnail(new Embed.EmbedThumbnail($"attachment://color.gif"))
|
||||
.Build(),
|
||||
files: [MiscUtils.GenerateColorPreview(color)]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue