Skip to content

Commit

Permalink
Add embbed colors add version command
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdShullah committed Aug 12, 2020
1 parent 8f8ee92 commit 8a07677
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
3 changes: 2 additions & 1 deletion OsuFriendsBot/Embeds/GrantedRolesEmbed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public GrantedRolesEmbed(SocketGuildUser user, List<SocketRole> grantedRoles, Os
{
WithTitle($"Granted roles on {user.Guild.Name}:")
.WithDescription(string.Join('\n', grantedRoles.Select(role => role.Name).OrderByDescending(role => role)))
.WithThumbnailUrl(osuUserDetails.Avatar.ToString());
.WithThumbnailUrl(osuUserDetails.Avatar.ToString())
.WithColor(Discord.Color.Gold);

AddProgressField(userData.Std, osuUserDetails.Std, Gamemode.Std);
AddProgressField(userData.Taiko, osuUserDetails.Taiko, Gamemode.Taiko);
Expand Down
3 changes: 2 additions & 1 deletion OsuFriendsBot/Embeds/VerifyEmbed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public VerifyEmbed(SocketGuildUser user, OsuUser osuUser)
WithTitle($"Hi {user.Username}!")
.WithDescription($"Verify your osu! account to get cool roles on {user.Guild.Name}!")
.AddField("Link", osuUser.Url)
.WithThumbnailUrl("https://osufriends.ovh/img/favicon.gif");
.WithThumbnailUrl("https://osufriends.ovh/img/favicon.gif")
.WithColor(Discord.Color.Gold);
}
}
}
12 changes: 8 additions & 4 deletions OsuFriendsBot/Modules/AdminModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public async Task RolesCmd()

EmbedBuilder embedBuilder = new EmbedBuilder();
embedBuilder
.WithTitle("Configured Roles:");
.WithTitle("Configured Roles:")
.WithColor(Color.Blue);

if (roles.Any())
{
Expand All @@ -77,7 +78,8 @@ public async Task MissingRolesCmd()

EmbedBuilder embedBuilder = new EmbedBuilder();
embedBuilder
.WithTitle($"Missing roles:");
.WithTitle($"Missing roles:")
.WithColor(Color.Blue);

if (missingRoles.Any())
{
Expand Down Expand Up @@ -107,7 +109,8 @@ public async Task CreateMissingRolesCmd()

EmbedBuilder embedBuilder = new EmbedBuilder();
embedBuilder
.WithTitle($"Created roles:");
.WithTitle($"Created roles:")
.WithColor(Color.Blue);

if (missingRoles.Any())
{
Expand Down Expand Up @@ -136,7 +139,8 @@ public async Task DeleteBotRolesCmd()

EmbedBuilder embedBuilder = new EmbedBuilder();
embedBuilder
.WithTitle($"Deleted roles:");
.WithTitle($"Deleted roles:")
.WithColor(Color.Blue);

if (guildRoles.Any())
{
Expand Down
18 changes: 16 additions & 2 deletions OsuFriendsBot/Modules/InfoModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public async Task HelpCmd()
foreach (ModuleInfo module in modules)
{
EmbedBuilder embedBuilder = new EmbedBuilder();
embedBuilder.WithTitle(module.Name).WithDescription(module.Summary ?? "No summary");
embedBuilder.WithTitle(module.Name).WithDescription(module.Summary ?? "No summary").WithColor(Color.Blue);
System.Collections.Generic.IReadOnlyList<CommandInfo> commands = module.Commands;
foreach (CommandInfo command in commands)
{
Expand Down Expand Up @@ -71,7 +71,21 @@ public async Task InfoCmd()
.WithDescription(app.Description)
.WithThumbnailUrl(Context.Client.CurrentUser.GetAvatarUrl())
.AddField("Author:", app.Owner)
.AddField("Git repo:", @"https://github.com/AbdShullah/OsuFriendsBot");
.AddField("Git repo:", @"https://github.com/AbdShullah/OsuFriendsBot")
.WithColor(Color.Blue);

await ReplyAsync(embed: embedBuilder.Build());
}
[Command("version")]
[Summary("Bot version")]
public async Task VersionCmd()
{
EmbedBuilder embedBuilder = new EmbedBuilder();
embedBuilder
.WithTitle($"0.0.6")
.WithDescription("Current Bot Version")
.WithThumbnailUrl(Context.Client.CurrentUser.GetAvatarUrl())
.WithColor(Color.Blue);

await ReplyAsync(embed: embedBuilder.Build());
}
Expand Down

0 comments on commit 8a07677

Please sign in to comment.