Skip to content

Commit 8a07677

Browse files
author
AbdShullah
committed
Add embbed colors add version command
1 parent 8f8ee92 commit 8a07677

File tree

4 files changed

+28
-8
lines changed

4 files changed

+28
-8
lines changed

OsuFriendsBot/Embeds/GrantedRolesEmbed.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ public GrantedRolesEmbed(SocketGuildUser user, List<SocketRole> grantedRoles, Os
1414
{
1515
WithTitle($"Granted roles on {user.Guild.Name}:")
1616
.WithDescription(string.Join('\n', grantedRoles.Select(role => role.Name).OrderByDescending(role => role)))
17-
.WithThumbnailUrl(osuUserDetails.Avatar.ToString());
17+
.WithThumbnailUrl(osuUserDetails.Avatar.ToString())
18+
.WithColor(Discord.Color.Gold);
1819

1920
AddProgressField(userData.Std, osuUserDetails.Std, Gamemode.Std);
2021
AddProgressField(userData.Taiko, osuUserDetails.Taiko, Gamemode.Taiko);

OsuFriendsBot/Embeds/VerifyEmbed.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ public VerifyEmbed(SocketGuildUser user, OsuUser osuUser)
1111
WithTitle($"Hi {user.Username}!")
1212
.WithDescription($"Verify your osu! account to get cool roles on {user.Guild.Name}!")
1313
.AddField("Link", osuUser.Url)
14-
.WithThumbnailUrl("https://osufriends.ovh/img/favicon.gif");
14+
.WithThumbnailUrl("https://osufriends.ovh/img/favicon.gif")
15+
.WithColor(Discord.Color.Gold);
1516
}
1617
}
1718
}

OsuFriendsBot/Modules/AdminModule.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ public async Task RolesCmd()
5353

5454
EmbedBuilder embedBuilder = new EmbedBuilder();
5555
embedBuilder
56-
.WithTitle("Configured Roles:");
56+
.WithTitle("Configured Roles:")
57+
.WithColor(Color.Blue);
5758

5859
if (roles.Any())
5960
{
@@ -77,7 +78,8 @@ public async Task MissingRolesCmd()
7778

7879
EmbedBuilder embedBuilder = new EmbedBuilder();
7980
embedBuilder
80-
.WithTitle($"Missing roles:");
81+
.WithTitle($"Missing roles:")
82+
.WithColor(Color.Blue);
8183

8284
if (missingRoles.Any())
8385
{
@@ -107,7 +109,8 @@ public async Task CreateMissingRolesCmd()
107109

108110
EmbedBuilder embedBuilder = new EmbedBuilder();
109111
embedBuilder
110-
.WithTitle($"Created roles:");
112+
.WithTitle($"Created roles:")
113+
.WithColor(Color.Blue);
111114

112115
if (missingRoles.Any())
113116
{
@@ -136,7 +139,8 @@ public async Task DeleteBotRolesCmd()
136139

137140
EmbedBuilder embedBuilder = new EmbedBuilder();
138141
embedBuilder
139-
.WithTitle($"Deleted roles:");
142+
.WithTitle($"Deleted roles:")
143+
.WithColor(Color.Blue);
140144

141145
if (guildRoles.Any())
142146
{

OsuFriendsBot/Modules/InfoModule.cs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public async Task HelpCmd()
3333
foreach (ModuleInfo module in modules)
3434
{
3535
EmbedBuilder embedBuilder = new EmbedBuilder();
36-
embedBuilder.WithTitle(module.Name).WithDescription(module.Summary ?? "No summary");
36+
embedBuilder.WithTitle(module.Name).WithDescription(module.Summary ?? "No summary").WithColor(Color.Blue);
3737
System.Collections.Generic.IReadOnlyList<CommandInfo> commands = module.Commands;
3838
foreach (CommandInfo command in commands)
3939
{
@@ -71,7 +71,21 @@ public async Task InfoCmd()
7171
.WithDescription(app.Description)
7272
.WithThumbnailUrl(Context.Client.CurrentUser.GetAvatarUrl())
7373
.AddField("Author:", app.Owner)
74-
.AddField("Git repo:", @"https://github.com/AbdShullah/OsuFriendsBot");
74+
.AddField("Git repo:", @"https://github.com/AbdShullah/OsuFriendsBot")
75+
.WithColor(Color.Blue);
76+
77+
await ReplyAsync(embed: embedBuilder.Build());
78+
}
79+
[Command("version")]
80+
[Summary("Bot version")]
81+
public async Task VersionCmd()
82+
{
83+
EmbedBuilder embedBuilder = new EmbedBuilder();
84+
embedBuilder
85+
.WithTitle($"0.0.6")
86+
.WithDescription("Current Bot Version")
87+
.WithThumbnailUrl(Context.Client.CurrentUser.GetAvatarUrl())
88+
.WithColor(Color.Blue);
7589

7690
await ReplyAsync(embed: embedBuilder.Build());
7791
}

0 commit comments

Comments
 (0)