commit
5776759281
@ -577,7 +577,7 @@ namespace NadekoBot.Modules.Administration
|
||||
public async Task DelVoiChanl(IUserMessage umsg, [Remainder] IVoiceChannel voiceChannel)
|
||||
{
|
||||
await voiceChannel.DeleteAsync().ConfigureAwait(false);
|
||||
await umsg.Channel.SendMessageAsync($"❗️Removed voice channel **{voiceChannel.Name}** successfully.").ConfigureAwait(false);
|
||||
await umsg.Channel.SendMessageAsync($"🗑 Removed voice channel **{voiceChannel.Name}** successfully.").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -587,7 +587,7 @@ namespace NadekoBot.Modules.Administration
|
||||
{
|
||||
var channel = (ITextChannel)umsg.Channel;
|
||||
var ch = await channel.Guild.CreateVoiceChannelAsync(channelName).ConfigureAwait(false);
|
||||
await channel.SendMessageAsync($"✅ Created voice channel **{ch.Name}**, ID `{ch.Id}`.").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync($"✅ Created voice channel **{ch.Name}**, ID: {ch.Id}.").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -596,7 +596,7 @@ namespace NadekoBot.Modules.Administration
|
||||
public async Task DelTxtChanl(IUserMessage umsg, [Remainder] ITextChannel toDelete)
|
||||
{
|
||||
await toDelete.DeleteAsync().ConfigureAwait(false);
|
||||
await umsg.Channel.SendMessageAsync($"❗️Removed text channel **{toDelete.Name}**, ID `{toDelete.Id}`.").ConfigureAwait(false);
|
||||
await umsg.Channel.SendMessageAsync($"🗑 Removed text channel **{toDelete.Name}**, ID: {toDelete.Id}.").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -606,7 +606,7 @@ namespace NadekoBot.Modules.Administration
|
||||
{
|
||||
var channel = (ITextChannel)umsg.Channel;
|
||||
var txtCh = await channel.Guild.CreateTextChannelAsync(channelName).ConfigureAwait(false);
|
||||
await channel.SendMessageAsync($"✅ Added text channel **{txtCh.Name}**, ID `{txtCh.Id}`.").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync($"✅ Added text channel **{txtCh.Name}**, ID: {txtCh.Id}.").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -693,7 +693,7 @@ namespace NadekoBot.Modules.Administration
|
||||
|
||||
await (await NadekoBot.Client.GetCurrentUserAsync()).ModifyAsync(u => u.Username = newName).ConfigureAwait(false);
|
||||
|
||||
await channel.SendMessageAsync($"🆒 Successfully changed name to **{newName}**").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync($"ℹ️ Successfully changed name to **{newName}**").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
|
@ -202,13 +202,13 @@ namespace NadekoBot.Modules.Administration
|
||||
|
||||
if (userThreshold < 2 || userThreshold > 30)
|
||||
{
|
||||
await channel.SendMessageAsync("User threshold must be between 2 and 30").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync("❗️User threshold must be between **2** and **30**.").ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (seconds < 2 || seconds > 300)
|
||||
{
|
||||
await channel.SendMessageAsync("Time must be between 2 and 300 seconds.").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync("❗️Time must be between **2** and **300** seconds.").ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -218,7 +218,7 @@ namespace NadekoBot.Modules.Administration
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await channel.SendMessageAsync("Failed creating a mute role. Give me ManageRoles permission" +
|
||||
await channel.SendMessageAsync("⚠️ Failed creating a mute role. Give me ManageRoles permission" +
|
||||
"or create 'nadeko-mute' role with disabled SendMessages and try again.")
|
||||
.ConfigureAwait(false);
|
||||
_log.Warn(ex);
|
||||
@ -233,7 +233,7 @@ namespace NadekoBot.Modules.Administration
|
||||
};
|
||||
antiRaidGuilds.AddOrUpdate(channel.Guild.Id, setting, (id, old) => setting);
|
||||
|
||||
await channel.SendMessageAsync($"{imsg.Author.Mention} `If {userThreshold} or more users join within {seconds} seconds, I will {action} them.`")
|
||||
await channel.SendMessageAsync($"ℹ️ {imsg.Author.Mention} If **{userThreshold}** or more users join within **{seconds}** seconds, I will **{action}** them.")
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
@ -250,7 +250,7 @@ namespace NadekoBot.Modules.Administration
|
||||
AntiSpamSetting throwaway;
|
||||
if (antiSpamGuilds.TryRemove(channel.Guild.Id, out throwaway))
|
||||
{
|
||||
await channel.SendMessageAsync("`Anti-Spam feature disabled on this server.`").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync("🆗 **Anti-Spam feature** has been **disabled** on this server.").ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -260,7 +260,7 @@ namespace NadekoBot.Modules.Administration
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await channel.SendMessageAsync("Failed creating a mute role. Give me ManageRoles permission" +
|
||||
await channel.SendMessageAsync("⚠️ Failed creating a mute role. Give me ManageRoles permission" +
|
||||
"or create 'nadeko-mute' role with disabled SendMessages and try again.")
|
||||
.ConfigureAwait(false);
|
||||
_log.Warn(ex);
|
||||
@ -272,7 +272,7 @@ namespace NadekoBot.Modules.Administration
|
||||
Action = action,
|
||||
MessageThreshold = messageCount,
|
||||
}))
|
||||
await channel.SendMessageAsync("`Anti-Spam feature enabled on this server.`").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync("✅ **Anti-Spam feature** has been **enabled** on this server.").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -69,11 +69,11 @@ namespace NadekoBot.Modules.Administration
|
||||
|
||||
if (role == null)
|
||||
{
|
||||
await channel.SendMessageAsync("`Auto assign role on user join is now disabled.`").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync("🆗 **Auto assign role** on user join is now **disabled**.").ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
await channel.SendMessageAsync("`Auto assigned role is set.`").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync("✅ **Auto assign role** on user join is now **enabled**.").ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,9 +39,9 @@ namespace NadekoBot.Modules.Administration
|
||||
uow.Complete();
|
||||
}
|
||||
if (ForwardDMs)
|
||||
await channel.SendMessageAsync("`I will forward DMs from now on.`").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync("✅ **I will forward DMs from now on.**").ConfigureAwait(false);
|
||||
else
|
||||
await channel.SendMessageAsync("`I will stop forwarding DMs.`").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync("🆗 **I will stop forwarding DMs from now on.**").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -57,9 +57,9 @@ namespace NadekoBot.Modules.Administration
|
||||
uow.Complete();
|
||||
}
|
||||
if (ForwardDMsToAllOwners)
|
||||
await channel.SendMessageAsync("`I will forward DMs to all owners.`").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync("ℹ️ **I will forward DMs to all owners.**").ConfigureAwait(false);
|
||||
else
|
||||
await channel.SendMessageAsync("`I will forward DMs only to the first owner.`").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync("ℹ️ **I will forward DMs only to the first owner.**").ConfigureAwait(false);
|
||||
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ namespace NadekoBot.Modules.Administration
|
||||
{
|
||||
if (ForwardDMs && ownerChannels.Any())
|
||||
{
|
||||
var toSend = $"`I received a message from {msg.Author} ({msg.Author.Id})`: {msg.Content}";
|
||||
var toSend = $"```markdown\n I received a message from [{msg.Author}]({msg.Author.Id}): {msg.Content}```";
|
||||
if (ForwardDMsToAllOwners)
|
||||
{
|
||||
var msgs = await Task.WhenAll(ownerChannels.Where(ch => ch.Recipient.Id != msg.Author.Id)
|
||||
|
@ -37,9 +37,9 @@ namespace NadekoBot.Modules.Utility
|
||||
|
||||
int i = 0;
|
||||
if (!arr.Any())
|
||||
await channel.SendMessageAsync(_l["`Nobody is playing that game.`"]).ConfigureAwait(false);
|
||||
await channel.SendMessageAsync(_l["🚧 `Nobody is playing that game.`"]).ConfigureAwait(false);
|
||||
else
|
||||
await channel.SendMessageAsync("```xl\n" + string.Join("\n", arr.GroupBy(item => (i++) / 3).Select(ig => string.Concat(ig.Select(el => $"• {el,-35}")))) + "\n```").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync("```css\n" + string.Join("\n", arr.GroupBy(item => (i++) / 3).Select(ig => string.Concat(ig.Select(el => $"• {el,-35}")))) + "\n```").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -50,20 +50,21 @@ namespace NadekoBot.Modules.Utility
|
||||
return;
|
||||
var channel = (ITextChannel)umsg.Channel;
|
||||
var arg = roles.Split(',').Select(r => r.Trim().ToUpperInvariant());
|
||||
string send = _l["`Here is a list of users in a specfic role:`"];
|
||||
string send = _l["ℹ️ **Here is a list of users in a specfic role:**"];
|
||||
foreach (var roleStr in arg.Where(str => !string.IsNullOrWhiteSpace(str) && str != "@EVERYONE" && str != "EVERYONE"))
|
||||
{
|
||||
var role = channel.Guild.Roles.Where(r => r.Name.ToUpperInvariant() == roleStr).FirstOrDefault();
|
||||
if (role == null) continue;
|
||||
send += $"\n`{role.Name}`\n";
|
||||
send += $"```css\n[{role.Name}]\n";
|
||||
send += string.Join(", ", channel.Guild.GetUsers().Where(u => u.Roles.Contains(role)).Select(u => u.ToString()));
|
||||
send += $"\n```";
|
||||
}
|
||||
var usr = umsg.Author as IGuildUser;
|
||||
while (send.Length > 2000)
|
||||
{
|
||||
if (!usr.GetPermissions(channel).ManageMessages)
|
||||
{
|
||||
await channel.SendMessageAsync($"{usr.Mention} you are not allowed to use this command on roles with a lot of users in them to prevent abuse.").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync($"⚠️ {usr.Mention} **you are not allowed to use this command on roles with a lot of users in them to prevent abuse.**").ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
var curstr = send.Substring(0, 2000);
|
||||
@ -80,7 +81,7 @@ namespace NadekoBot.Modules.Utility
|
||||
public async Task CheckMyPerms(IUserMessage msg)
|
||||
{
|
||||
|
||||
StringBuilder builder = new StringBuilder("```\n");
|
||||
StringBuilder builder = new StringBuilder("```http\n");
|
||||
var user = msg.Author as IGuildUser;
|
||||
var perms = user.GetPermissions((ITextChannel)msg.Channel);
|
||||
foreach (var p in perms.GetType().GetProperties().Where(p => !p.GetGetMethod().GetParameters().Any()))
|
||||
@ -97,20 +98,20 @@ namespace NadekoBot.Modules.Utility
|
||||
public async Task UserId(IUserMessage msg, IGuildUser target = null)
|
||||
{
|
||||
var usr = target ?? msg.Author;
|
||||
await msg.Reply($"Id of the user { usr.Username } is { usr.Id }").ConfigureAwait(false);
|
||||
await msg.Reply($"🆔 of the user **{ usr.Username }** is `{ usr.Id }`").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
public async Task ChannelId(IUserMessage msg)
|
||||
{
|
||||
await msg.Reply($"This Channel's ID is {msg.Channel.Id}").ConfigureAwait(false);
|
||||
await msg.Reply($"ℹ️ This **Channel's ID** is `{msg.Channel.Id}`").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task ServerId(IUserMessage msg)
|
||||
{
|
||||
await msg.Reply($"This server's ID is {((ITextChannel)msg.Channel).Guild.Id}").ConfigureAwait(false);
|
||||
await msg.Reply($"ℹ️ This **Server's ID** is `{((ITextChannel)msg.Channel).Guild.Id}`").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -126,11 +127,11 @@ namespace NadekoBot.Modules.Utility
|
||||
return;
|
||||
if (target != null)
|
||||
{
|
||||
await msg.Reply($"`Page #{page} of roles for **{target.Username}**:` \n• " + string.Join("\n• ", target.Roles.Except(new[] { guild.EveryoneRole }).OrderBy(r => r.Position).Skip((page - 1) * RolesPerPage).Take(RolesPerPage)).SanitizeMentions());
|
||||
await msg.Reply($"⚔ **Page #{page} of roles for {target.Username}:** ```css\n• " + string.Join("\n• ", target.Roles.Except(new[] { guild.EveryoneRole }).OrderBy(r => r.Position).Skip((page - 1) * RolesPerPage).Take(RolesPerPage)).SanitizeMentions() + "\n```");
|
||||
}
|
||||
else
|
||||
{
|
||||
await msg.Reply($"`Page #{page} of all roles on this server:` \n• " + string.Join("\n• ", guild.Roles.Except(new[] { guild.EveryoneRole }).OrderBy(r => r.Position).Skip((page - 1) * RolesPerPage).Take(RolesPerPage)).SanitizeMentions());
|
||||
await msg.Reply($"⚔ **Page #{page} of all roles on this server:** ```css\n• " + string.Join("\n• ", guild.Roles.Except(new[] { guild.EveryoneRole }).OrderBy(r => r.Position).Skip((page - 1) * RolesPerPage).Take(RolesPerPage)).SanitizeMentions() + "\n```");
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,9 +148,9 @@ namespace NadekoBot.Modules.Utility
|
||||
|
||||
var topic = channel.Topic;
|
||||
if (string.IsNullOrWhiteSpace(topic))
|
||||
await channel.SendMessageAsync("`No topic set.`");
|
||||
await channel.SendMessageAsync("❎ **No topic set.**");
|
||||
else
|
||||
await channel.SendMessageAsync("`Topic:` " + topic);
|
||||
await channel.SendMessageAsync("ℹ️ **Topic:** " + topic);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -167,7 +168,7 @@ namespace NadekoBot.Modules.Utility
|
||||
var matches = emojiFinder.Matches(emojis);
|
||||
|
||||
var result = string.Join("\n", matches.Cast<Match>()
|
||||
.Select(m => $"`Name:` {m.Groups["name"]} `Link:` http://discordapp.com/api/emojis/{m.Groups["id"]}.png"));
|
||||
.Select(m => $"**Name:** {m.Groups["name"]} **Link:** http://discordapp.com/api/emojis/{m.Groups["id"]}.png"));
|
||||
|
||||
await msg.Channel.SendMessageAsync(result).ConfigureAwait(false);
|
||||
}
|
||||
@ -188,11 +189,11 @@ namespace NadekoBot.Modules.Utility
|
||||
|
||||
if (!guilds.Any())
|
||||
{
|
||||
await channel.SendMessageAsync("`No servers found on that page.`").ConfigureAwait(false);
|
||||
await channel.SendMessageAsync("❎ No servers found on that page.").ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
await channel.SendMessageAsync(String.Join("\n", guilds.Select(g => $"`Name:` {g.Name} `Id:` {g.Id} `Members:` {g.GetUsers().Count} `OwnerId:`{g.OwnerId}"))).ConfigureAwait(false);
|
||||
await channel.SendMessageAsync(String.Join("\n", guilds.Select(g => $"```css\n Name: {g.Name} ID: {g.Id} Members: #{g.GetUsers().Count} OwnerID:{g.OwnerId} ```"))).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
//[NadekoCommand, Usage, Description, Aliases]
|
||||
|
Loading…
Reference in New Issue
Block a user