Fancy Colors in embeds :D
This commit is contained in:
parent
4db152f304
commit
9ff2e7cdc0
3 changed files with 15 additions and 6 deletions
|
@ -2,19 +2,27 @@
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using Discord;
|
using Discord;
|
||||||
|
using Geekbot.net.Lib;
|
||||||
|
|
||||||
namespace Geekbot.net.Modules
|
namespace Geekbot.net.Modules
|
||||||
{
|
{
|
||||||
public class Info : ModuleBase
|
public class Info : ModuleBase
|
||||||
{
|
{
|
||||||
|
private readonly IRedisClient redis;
|
||||||
|
public Info(IRedisClient redisClient)
|
||||||
|
{
|
||||||
|
redis = redisClient;
|
||||||
|
}
|
||||||
|
|
||||||
[Command("info"), Summary("Show some info about the bot.")]
|
[Command("info"), Summary("Show some info about the bot.")]
|
||||||
public async Task getInfo()
|
public async Task getInfo()
|
||||||
{
|
{
|
||||||
var eb = new EmbedBuilder();
|
var eb = new EmbedBuilder();
|
||||||
eb.WithAuthor(new EmbedAuthorBuilder()
|
eb.WithTitle("Geekbot Information");
|
||||||
.WithIconUrl(Context.User.GetAvatarUrl())
|
eb.WithColor(new Color(110, 204, 147));
|
||||||
.WithName(Context.User.Username));
|
|
||||||
eb.AddField("Test", "Some testing stuff here...");
|
eb.AddInlineField("Version", "3.1")
|
||||||
|
.AddInlineField("Uptime", "Not Calculated...");
|
||||||
await ReplyAsync("", false, eb.Build());
|
await ReplyAsync("", false, eb.Build());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,8 @@ namespace Geekbot.net.Modules
|
||||||
eb.WithAuthor(new EmbedAuthorBuilder()
|
eb.WithAuthor(new EmbedAuthorBuilder()
|
||||||
.WithIconUrl(userInfo.GetAvatarUrl())
|
.WithIconUrl(userInfo.GetAvatarUrl())
|
||||||
.WithName(userInfo.Username));
|
.WithName(userInfo.Username));
|
||||||
|
eb.WithColor(new Color(221, 255, 119));
|
||||||
|
|
||||||
eb.AddField("Discordian Since", $"{userInfo.CreatedAt.Day}/{userInfo.CreatedAt.Month}/{userInfo.CreatedAt.Year} ({age} days)");
|
eb.AddField("Discordian Since", $"{userInfo.CreatedAt.Day}/{userInfo.CreatedAt.Month}/{userInfo.CreatedAt.Year} ({age} days)");
|
||||||
eb.AddInlineField("Level", level)
|
eb.AddInlineField("Level", level)
|
||||||
.AddInlineField("Messages Sent", messages);
|
.AddInlineField("Messages Sent", messages);
|
||||||
|
|
|
@ -114,7 +114,7 @@ namespace Geekbot.net
|
||||||
{
|
{
|
||||||
var message = messsageParam;
|
var message = messsageParam;
|
||||||
if (message == null) return;
|
if (message == null) return;
|
||||||
if (message.Author.Username.Equals(client.CurrentUser.Username)) return;
|
// if (message.Author.Username.Equals(client.CurrentUser.Username)) return;
|
||||||
|
|
||||||
var channel = (SocketGuildChannel)message.Channel;
|
var channel = (SocketGuildChannel)message.Channel;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue