commit
12110a7fc1
@ -38,7 +38,7 @@ namespace NadekoBot.Modules.Help
|
|||||||
public async Task Modules(IUserMessage umsg)
|
public async Task Modules(IUserMessage umsg)
|
||||||
{
|
{
|
||||||
|
|
||||||
await umsg.Channel.SendMessageAsync("`List of modules:` ```xl\n• " + string.Join("\n• ", _commands.Modules.Select(m => m.Name)) + $"\n``` `Type \"-commands module_name\" to get a list of commands in that module.`")
|
await umsg.Channel.SendMessageAsync("📜 **List of modules:** ```xl\n• " + string.Join("\n• ", _commands.Modules.Select(m => m.Name)) + $"\n``` ℹ️ **Type** `-commands module_name` **to get a list of commands in that module.** ***e.g.*** `-commands games`")
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,18 +58,18 @@ namespace NadekoBot.Modules.Help
|
|||||||
var cmdsArray = cmds as Command[] ?? cmds.ToArray();
|
var cmdsArray = cmds as Command[] ?? cmds.ToArray();
|
||||||
if (!cmdsArray.Any())
|
if (!cmdsArray.Any())
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("That module does not exist.").ConfigureAwait(false);
|
await channel.SendMessageAsync("🚫 **That module does not exist.**").ConfigureAwait(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (module != "customreactions" && module != "conversations")
|
if (module != "customreactions" && module != "conversations")
|
||||||
{
|
{
|
||||||
await channel.SendTableAsync("`List Of Commands:`\n", cmdsArray, el => $"{el.Text,-15} {"["+el.Aliases.Skip(1).FirstOrDefault()+"]",-8}").ConfigureAwait(false);
|
await channel.SendTableAsync("📃 **List Of Commands:**\n", cmdsArray, el => $"{el.Text,-15} {"["+el.Aliases.Skip(1).FirstOrDefault()+"]",-8}").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("`List Of Commands:`\n• " + string.Join("\n• ", cmdsArray.Select(c => $"{c.Text}")));
|
await channel.SendMessageAsync("📃 **List Of Commands:**\n• " + string.Join("\n• ", cmdsArray.Select(c => $"{c.Text}")));
|
||||||
}
|
}
|
||||||
await channel.SendMessageAsync($"`You can type \"{NadekoBot.ModulePrefixes[typeof(Help).Name]}h CommandName\" to see the help about that specific command.`").ConfigureAwait(false);
|
await channel.SendMessageAsync($"ℹ️ **Type** `\"{NadekoBot.ModulePrefixes[typeof(Help).Name]}h CommandName\"` **to see the help for that specified command.** ***e.g.*** `-h >8ball`").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
@ -88,7 +88,7 @@ namespace NadekoBot.Modules.Help
|
|||||||
|
|
||||||
if (com == null)
|
if (com == null)
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("`No command found.`");
|
await channel.SendMessageAsync("🔍 **I can't find that command.**");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var str = $"**__Help for:__ `{com.Text}`**";
|
var str = $"**__Help for:__ `{com.Text}`**";
|
||||||
@ -107,7 +107,7 @@ namespace NadekoBot.Modules.Help
|
|||||||
.Select(ca =>
|
.Select(ca =>
|
||||||
{
|
{
|
||||||
if (ca.AttributeType == typeof(OwnerOnlyAttribute))
|
if (ca.AttributeType == typeof(OwnerOnlyAttribute))
|
||||||
return "**Bot owner only.**";
|
return "**Bot Owner only.**";
|
||||||
else if (ca.AttributeType == typeof(RequirePermissionAttribute))
|
else if (ca.AttributeType == typeof(RequirePermissionAttribute))
|
||||||
return $"**Requires {(GuildPermission)ca.ConstructorArguments.FirstOrDefault().Value} server permission.**".Replace("Guild", "Server");
|
return $"**Requires {(GuildPermission)ca.ConstructorArguments.FirstOrDefault().Value} server permission.**".Replace("Guild", "Server");
|
||||||
else
|
else
|
||||||
@ -182,4 +182,4 @@ Don't forget to leave your discord name or id in the message.
|
|||||||
public int GetHashCode(Command obj) => obj.Text.GetHashCode();
|
public int GetHashCode(Command obj) => obj.Text.GetHashCode();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using NadekoBot.Attributes;
|
using NadekoBot.Attributes;
|
||||||
using NadekoBot.Extensions;
|
using NadekoBot.Extensions;
|
||||||
@ -46,21 +46,21 @@ namespace NadekoBot.Modules.Utility
|
|||||||
var createdAt = new DateTime(2015, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(server.Id >> 22);
|
var createdAt = new DateTime(2015, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(server.Id >> 22);
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
var users = await server.GetUsersAsync();
|
var users = await server.GetUsersAsync();
|
||||||
sb.AppendLine($@"`Name:` **{server.Name}**
|
sb.AppendLine($@"__`Name:`__ **{server.Name}**
|
||||||
`Owner:` **{await server.GetUserAsync(server.OwnerId)}**
|
__`Owner:`__ **{await server.GetUserAsync(server.OwnerId)}**
|
||||||
`Id:` **{server.Id}**
|
__`ID:`__ **{server.Id}**
|
||||||
`Icon Url:` **{ server.IconUrl}**
|
__`Icon URL:`__ { server.IconUrl}
|
||||||
`TextChannels:` **{(await server.GetTextChannelsAsync()).Count()}** `VoiceChannels:` **{(await server.GetVoiceChannelsAsync()).Count()}**
|
__`TextChannels:`__ **{(await server.GetTextChannelsAsync()).Count()}** `VoiceChannels:` **{(await server.GetVoiceChannelsAsync()).Count()}**
|
||||||
`Members:` **{users.Count}** `-` {users.Count(u => u.Status == UserStatus.Online)}:green_heart: {users.Count(u => u.Status == UserStatus.Idle)}:yellow_heart: {users.Count(u => u.Status == UserStatus.DoNotDisturb)}:heart: {users.Count(u=> u.Status == UserStatus.Offline || u.Status == UserStatus.Unknown)}:black_heart:
|
__`Members:`__ **{users.Count}** `-` {users.Count(u => u.Status == UserStatus.Online)}:green_heart: {users.Count(u => u.Status == UserStatus.Idle)}:yellow_heart: {users.Count(u => u.Status == UserStatus.DoNotDisturb)}:heart: {users.Count(u=> u.Status == UserStatus.Offline || u.Status == UserStatus.Unknown)}:black_heart:
|
||||||
`Roles:` **{server.Roles.Count()}**
|
__`Roles:`__ **{server.Roles.Count()}**
|
||||||
`Created At:` **{createdAt.ToString("dd.MM.yyyy HH:mm")}**
|
__`Created At:`__ **{createdAt.ToString("dd.MM.yyyy HH:mm")}**
|
||||||
");
|
");
|
||||||
if (server.Emojis.Count() > 0)
|
if (server.Emojis.Count() > 0)
|
||||||
sb.AppendLine($"`Custom Emojis:` **{string.Join(", ", server.Emojis)}**");
|
sb.AppendLine($"__`Custom Emojis:`__ *{string.Join(", ", server.Emojis)}*");
|
||||||
if (server.Features.Count() > 0)
|
if (server.Features.Count() > 0)
|
||||||
sb.AppendLine($"`Features:` **{string.Join(", ", server.Features)}**");
|
sb.AppendLine($"__`Features:`__ **{string.Join(", ", server.Features)}**");
|
||||||
if (!string.IsNullOrWhiteSpace(server.SplashUrl))
|
if (!string.IsNullOrWhiteSpace(server.SplashUrl))
|
||||||
sb.AppendLine($"`Region:` **{server.VoiceRegionId}**");
|
sb.AppendLine($"__`Region:`__ **{server.VoiceRegionId}**");
|
||||||
await msg.Reply(sb.ToString()).ConfigureAwait(false);
|
await msg.Reply(sb.ToString()).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,11 +72,11 @@ namespace NadekoBot.Modules.Utility
|
|||||||
if (ch == null)
|
if (ch == null)
|
||||||
return;
|
return;
|
||||||
var createdAt = new DateTime(2015, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(ch.Id >> 22);
|
var createdAt = new DateTime(2015, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(ch.Id >> 22);
|
||||||
var toReturn = $@"`Name:` **#{ch.Name}**
|
var toReturn = $@"__`Name:`__ **#{ch.Name}**
|
||||||
`Id:` **{ch.Id}**
|
__`ID:`__ **{ch.Id}**
|
||||||
`Created At:` **{createdAt.ToString("dd.MM.yyyy HH:mm")}**
|
__`Created At:`__ **{createdAt.ToString("dd.MM.yyyy HH:mm")}**
|
||||||
`Topic:` **{ch.Topic}**
|
__`Topic:`__ {ch.Topic}
|
||||||
`Users:` **{(await ch.GetUsersAsync()).Count()}**";
|
__`Users:`__ **{(await ch.GetUsersAsync()).Count()}**";
|
||||||
await msg.Reply(toReturn).ConfigureAwait(false);
|
await msg.Reply(toReturn).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,16 +88,16 @@ namespace NadekoBot.Modules.Utility
|
|||||||
var user = usr ?? msg.Author as IGuildUser;
|
var user = usr ?? msg.Author as IGuildUser;
|
||||||
if (user == null)
|
if (user == null)
|
||||||
return;
|
return;
|
||||||
var toReturn = $"`Name#Discrim:` **#{user.Username}#{user.Discriminator}**\n";
|
var toReturn = $"__`Name:`__ **{user.Username}#{user.Discriminator}**\n";
|
||||||
if (!string.IsNullOrWhiteSpace(user.Nickname))
|
if (!string.IsNullOrWhiteSpace(user.Nickname))
|
||||||
toReturn += $"`Nickname:` **{user.Nickname}**";
|
toReturn += $"__`Nickname:`__ **{user.Nickname}** ";
|
||||||
toReturn += $@"`Id:` **{user.Id}**
|
toReturn += $@"__`ID:`__ **{user.Id}**
|
||||||
`Current Game:` **{(user.Game?.Name == null ? "-" : user.Game.Name)}**
|
__`Current Game:`__ **{(user.Game?.Name == null ? "-" : user.Game.Name)}**
|
||||||
`Joined Server:` **{user.JoinedAt?.ToString("dd.MM.yyyy HH:mm")}**
|
__`Joined Server:`__ **{user.JoinedAt?.ToString("dd.MM.yyyy HH:mm")}**
|
||||||
`Joined Discord:` **{user.CreatedAt.ToString("dd.MM.yyyy HH:mm")}**
|
__`Joined Discord:`__ **{user.CreatedAt.ToString("dd.MM.yyyy HH:mm")}**
|
||||||
`Roles:` **({user.Roles.Count()}) - {string.Join(", ", user.Roles.Select(r => r.Name)).SanitizeMentions()}**
|
__`Roles:`__ **({user.Roles.Count()}) - {string.Join(", ", user.Roles.Select(r => r.Name)).SanitizeMentions()}**
|
||||||
`AvatarUrl:` **{await NadekoBot.Google.ShortenUrl(user.AvatarUrl).ConfigureAwait(false)}**";
|
__`Avatar URL:`__ **{await NadekoBot.Google.ShortenUrl(user.AvatarUrl).ConfigureAwait(false)}**";
|
||||||
await msg.Reply(toReturn).ConfigureAwait(false);
|
await msg.Reply(toReturn).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user