Merge pull request #774 from samdivaio/1.0
Update with emojis, colours and few other fixes
This commit is contained in:
commit
1ad7918dd8
@ -119,7 +119,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
await uow.CompleteAsync();
|
await uow.CompleteAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
await channel.SendMessageAsync($"{imsg.Author.Mention} :ok: `Permissions for this server are reset`");
|
await channel.SendMessageAsync($"{imsg.Author.Mention} 🆗 **Permissions for this server are reset.**");
|
||||||
}
|
}
|
||||||
|
|
||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
@ -137,9 +137,9 @@ namespace NadekoBot.Modules.Administration
|
|||||||
await uow.CompleteAsync();
|
await uow.CompleteAsync();
|
||||||
}
|
}
|
||||||
if (conf.DeleteMessageOnCommand)
|
if (conf.DeleteMessageOnCommand)
|
||||||
await channel.SendMessageAsync("❗`Now automatically deleting successfull command invokations.`").ConfigureAwait(false);
|
await channel.SendMessageAsync("✅ **Now automatically deleting successful command invokations.**").ConfigureAwait(false);
|
||||||
else
|
else
|
||||||
await channel.SendMessageAsync("❗`Stopped automatic deletion of successfull command invokations.`").ConfigureAwait(false);
|
await channel.SendMessageAsync("❗**Stopped automatic deletion of successful command invokations.**").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
@ -151,11 +151,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
await usr.AddRolesAsync(role).ConfigureAwait(false);
|
await usr.AddRolesAsync(role).ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync($"Successfully added role **{role.Name}** to user **{usr.Username}**").ConfigureAwait(false);
|
await channel.SendMessageAsync($"ℹ️ Successfully added role **{role.Name}** to user **{usr.Username}**").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("Failed to add roles. Bot has insufficient permissions.\n").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ Failed to add role. **Bot has insufficient permissions.**\n").ConfigureAwait(false);
|
||||||
Console.WriteLine(ex.ToString());
|
Console.WriteLine(ex.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -169,11 +169,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
await usr.RemoveRolesAsync(role).ConfigureAwait(false);
|
await usr.RemoveRolesAsync(role).ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync($"Successfully removed role **{role.Name}** from user **{usr.Username}**").ConfigureAwait(false);
|
await channel.SendMessageAsync($"ℹ️ Successfully removed role **{role.Name}** from user **{usr.Username}**").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("Failed to remove roles. Most likely reason: Insufficient permissions.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ Failed to remove role. Most likely reason: **Insufficient permissions.**").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -187,15 +187,15 @@ namespace NadekoBot.Modules.Administration
|
|||||||
{
|
{
|
||||||
if (roleToEdit.Position > (await channel.Guild.GetCurrentUserAsync().ConfigureAwait(false)).Roles.Max(r => r.Position))
|
if (roleToEdit.Position > (await channel.Guild.GetCurrentUserAsync().ConfigureAwait(false)).Roles.Max(r => r.Position))
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("You can't edit roles higher than your highest role.").ConfigureAwait(false);
|
await channel.SendMessageAsync("🚫 You can't edit roles higher than your highest role.").ConfigureAwait(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await roleToEdit.ModifyAsync(g => g.Name = newname).ConfigureAwait(false);
|
await roleToEdit.ModifyAsync(g => g.Name = newname).ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync("Role renamed.").ConfigureAwait(false);
|
await channel.SendMessageAsync("✅ Role renamed.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("Failed to rename role. Probably insufficient permissions.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ Failed to rename role. Probably **insufficient permissions.**").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,11 +209,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
await user.RemoveRolesAsync(user.Roles).ConfigureAwait(false);
|
await user.RemoveRolesAsync(user.Roles).ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync($"Successfully removed **all** roles from user **{user.Username}**").ConfigureAwait(false);
|
await channel.SendMessageAsync($"🗑 Successfully removed **all** roles from user **{user.Username}**").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("Failed to remove roles. Most likely reason: Insufficient permissions.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ Failed to remove roles. Most likely reason: **Insufficient permissions.**").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,11 +230,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var r = await channel.Guild.CreateRoleAsync(roleName).ConfigureAwait(false);
|
var r = await channel.Guild.CreateRoleAsync(roleName).ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync($"Successfully created role **{r.Name}**.").ConfigureAwait(false);
|
await channel.SendMessageAsync($"✅ Successfully created role **{r.Name}**.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync(":warning: Unspecified error.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ Unspecified error.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
|
|
||||||
if (args.Count() != 2 && args.Count() != 4)
|
if (args.Count() != 2 && args.Count() != 4)
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("The parameters are invalid.").ConfigureAwait(false);
|
await channel.SendMessageAsync("❌ The parameters specified are **invalid.**").ConfigureAwait(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var roleName = args[0].ToUpperInvariant();
|
var roleName = args[0].ToUpperInvariant();
|
||||||
@ -255,7 +255,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
|
|
||||||
if (role == null)
|
if (role == null)
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("That role does not exist.").ConfigureAwait(false);
|
await channel.SendMessageAsync("🚫 That role **does not exist.**").ConfigureAwait(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
@ -268,11 +268,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
var blue = Convert.ToByte(rgb ? int.Parse(args[3]) : Convert.ToInt32(arg1.Substring(4, 2), 16));
|
var blue = Convert.ToByte(rgb ? int.Parse(args[3]) : Convert.ToInt32(arg1.Substring(4, 2), 16));
|
||||||
|
|
||||||
await role.ModifyAsync(r => r.Color = new Discord.Color(red, green, blue).RawValue).ConfigureAwait(false);
|
await role.ModifyAsync(r => r.Color = new Discord.Color(red, green, blue).RawValue).ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync($"Role {role.Name}'s color has been changed.").ConfigureAwait(false);
|
await channel.SendMessageAsync($"☑️ Role **{role.Name}'s** color has been changed.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("Error occured, most likely invalid parameters or insufficient permissions.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ Error occured, most likely **invalid parameters** or **insufficient permissions.**").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,16 +284,16 @@ namespace NadekoBot.Modules.Administration
|
|||||||
var channel = (ITextChannel)umsg.Channel;
|
var channel = (ITextChannel)umsg.Channel;
|
||||||
if (string.IsNullOrWhiteSpace(msg))
|
if (string.IsNullOrWhiteSpace(msg))
|
||||||
{
|
{
|
||||||
msg = "No reason provided.";
|
msg = "❗️No reason provided.";
|
||||||
}
|
}
|
||||||
if (umsg.Author.Id != user.Guild.OwnerId && user.Roles.Select(r=>r.Position).Max() >= ((IGuildUser)umsg.Author).Roles.Select(r => r.Position).Max())
|
if (umsg.Author.Id != user.Guild.OwnerId && user.Roles.Select(r=>r.Position).Max() >= ((IGuildUser)umsg.Author).Roles.Select(r => r.Position).Max())
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("You can't use this command on users with a role higher or equal to yours in the role hierarchy.");
|
await channel.SendMessageAsync("⚠️ You can't use this command on users with a role higher or equal to yours in the role hierarchy.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await (await user.CreateDMChannelAsync()).SendMessageAsync($"**You have been BANNED from `{channel.Guild.Name}` server.**\n" +
|
await (await user.CreateDMChannelAsync()).SendMessageAsync($"⛔️ **You have been BANNED from `{channel.Guild.Name}` server.**\n" +
|
||||||
$"Reason: {msg}").ConfigureAwait(false);
|
$"Reason: {msg}").ConfigureAwait(false);
|
||||||
await Task.Delay(2000).ConfigureAwait(false);
|
await Task.Delay(2000).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
@ -302,11 +302,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
{
|
{
|
||||||
await channel.Guild.AddBanAsync(user, 7).ConfigureAwait(false);
|
await channel.Guild.AddBanAsync(user, 7).ConfigureAwait(false);
|
||||||
|
|
||||||
await channel.SendMessageAsync("Banned user " + user.Username + " Id: " + user.Id).ConfigureAwait(false);
|
await channel.SendMessageAsync("⛔️ **Banned** user **" + user.Username + "** ID: " + user.Id).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("Error. Most likely I don't have sufficient permissions.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ **Error.** Most likely I don't have sufficient permissions.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,16 +319,16 @@ namespace NadekoBot.Modules.Administration
|
|||||||
var channel = (ITextChannel)umsg.Channel;
|
var channel = (ITextChannel)umsg.Channel;
|
||||||
if (string.IsNullOrWhiteSpace(msg))
|
if (string.IsNullOrWhiteSpace(msg))
|
||||||
{
|
{
|
||||||
msg = "No reason provided.";
|
msg = "❗️No reason provided.";
|
||||||
}
|
}
|
||||||
if (umsg.Author.Id != user.Guild.OwnerId && user.Roles.Select(r => r.Position).Max() >= ((IGuildUser)umsg.Author).Roles.Select(r => r.Position).Max())
|
if (umsg.Author.Id != user.Guild.OwnerId && user.Roles.Select(r => r.Position).Max() >= ((IGuildUser)umsg.Author).Roles.Select(r => r.Position).Max())
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("You can't use this command on users with a role higher or equal to yours in the role hierarchy.");
|
await channel.SendMessageAsync("⚠️ You can't use this command on users with a role higher or equal to yours in the role hierarchy.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await user.SendMessageAsync($"**You have been SOFT-BANNED from `{channel.Guild.Name}` server.**\n" +
|
await user.SendMessageAsync($"☣ **You have been SOFT-BANNED from `{channel.Guild.Name}` server.**\n" +
|
||||||
$"Reason: {msg}").ConfigureAwait(false);
|
$"Reason: {msg}").ConfigureAwait(false);
|
||||||
await Task.Delay(2000).ConfigureAwait(false);
|
await Task.Delay(2000).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
@ -339,11 +339,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
try { await channel.Guild.RemoveBanAsync(user).ConfigureAwait(false); }
|
try { await channel.Guild.RemoveBanAsync(user).ConfigureAwait(false); }
|
||||||
catch { await channel.Guild.RemoveBanAsync(user).ConfigureAwait(false); }
|
catch { await channel.Guild.RemoveBanAsync(user).ConfigureAwait(false); }
|
||||||
|
|
||||||
await channel.SendMessageAsync("Soft-Banned user " + user.Username + " Id: " + user.Id).ConfigureAwait(false);
|
await channel.SendMessageAsync("☣ **Soft-Banned** user **" + user.Username + "** ID: " + user.Id).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("Error. Most likely I don't have sufficient permissions.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ Error. Most likely I don't have sufficient permissions.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -356,20 +356,20 @@ namespace NadekoBot.Modules.Administration
|
|||||||
|
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("User not found.").ConfigureAwait(false);
|
await channel.SendMessageAsync("❗️User not found.").ConfigureAwait(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (umsg.Author.Id != user.Guild.OwnerId && user.Roles.Select(r => r.Position).Max() >= ((IGuildUser)umsg.Author).Roles.Select(r => r.Position).Max())
|
if (umsg.Author.Id != user.Guild.OwnerId && user.Roles.Select(r => r.Position).Max() >= ((IGuildUser)umsg.Author).Roles.Select(r => r.Position).Max())
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("You can't use this command on users with a role higher or equal to yours in the role hierarchy.");
|
await channel.SendMessageAsync("⚠️ You can't use this command on users with a role higher or equal to yours in the role hierarchy.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrWhiteSpace(msg))
|
if (!string.IsNullOrWhiteSpace(msg))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await user.SendMessageAsync($"**You have been KICKED from `{channel.Guild.Name}` server.**\n" +
|
await user.SendMessageAsync($"‼️**You have been KICKED from `{channel.Guild.Name}` server.**\n" +
|
||||||
$"Reason: {msg}").ConfigureAwait(false);
|
$"Reason: {msg}").ConfigureAwait(false);
|
||||||
await Task.Delay(2000).ConfigureAwait(false);
|
await Task.Delay(2000).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
@ -378,11 +378,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
await user.KickAsync().ConfigureAwait(false);
|
await user.KickAsync().ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync("Kicked user " + user.Username + " Id: " + user.Id).ConfigureAwait(false);
|
await channel.SendMessageAsync("‼️**Kicked** user **" + user.Username + "** ID: " + user.Id).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("Error. Most likely I don't have sufficient permissions.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ Error. Most likely I don't have sufficient permissions.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -404,7 +404,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
GuildMuteRoles.AddOrUpdate(channel.Guild.Id, name, (id, old) => name);
|
GuildMuteRoles.AddOrUpdate(channel.Guild.Id, name, (id, old) => name);
|
||||||
await uow.CompleteAsync().ConfigureAwait(false);
|
await uow.CompleteAsync().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
await channel.SendMessageAsync("`New mute role set.`").ConfigureAwait(false);
|
await channel.SendMessageAsync("☑️ **New mute role set.**").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
@ -426,11 +426,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
{
|
{
|
||||||
await user.ModifyAsync(usr => usr.Mute = true).ConfigureAwait(false);
|
await user.ModifyAsync(usr => usr.Mute = true).ConfigureAwait(false);
|
||||||
await user.AddRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(false)).ConfigureAwait(false);
|
await user.AddRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(false)).ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync($"**{user}** was muted from text and voice chat successfully.").ConfigureAwait(false);
|
await channel.SendMessageAsync($"🔇 **{user}** was muted from text and voice chat successfully.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -446,11 +446,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
{
|
{
|
||||||
await user.ModifyAsync(usr => usr.Mute = false).ConfigureAwait(false);
|
await user.ModifyAsync(usr => usr.Mute = false).ConfigureAwait(false);
|
||||||
await user.RemoveRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(false)).ConfigureAwait(false);
|
await user.RemoveRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(false)).ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync($"**{user}** was unmuted from text and voice chat successfully.").ConfigureAwait(false);
|
await channel.SendMessageAsync($"🔉 **{user}** was unmuted from text and voice chat successfully.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -464,11 +464,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
await user.AddRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(false)).ConfigureAwait(false);
|
await user.AddRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(false)).ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync($"**{user}** was muted from chatting successfully.").ConfigureAwait(false);
|
await channel.SendMessageAsync($"🔇 **{user}** was muted from chatting successfully.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -482,11 +482,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
await user.RemoveRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(false)).ConfigureAwait(false);
|
await user.RemoveRolesAsync(await GetMuteRole(channel.Guild).ConfigureAwait(false)).ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync($"**{user}** was unmuted from chatting successfully.").ConfigureAwait(false);
|
await channel.SendMessageAsync($"🔉 **{user}** was unmuted from chatting successfully.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -500,11 +500,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
await user.ModifyAsync(usr => usr.Mute = true).ConfigureAwait(false);
|
await user.ModifyAsync(usr => usr.Mute = true).ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync($"**{user}** was voice muted successfully.").ConfigureAwait(false);
|
await channel.SendMessageAsync($"🔇 **{user}** was voice muted successfully.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -517,11 +517,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
await user.ModifyAsync(usr => usr.Mute = false).ConfigureAwait(false);
|
await user.ModifyAsync(usr => usr.Mute = false).ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync($"**{user}** was voice unmuted successfully.").ConfigureAwait(false);
|
await channel.SendMessageAsync($"🎙 **{user}** was voice unmuted successfully.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -540,11 +540,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
{
|
{
|
||||||
await u.ModifyAsync(usr=>usr.Deaf = true).ConfigureAwait(false);
|
await u.ModifyAsync(usr=>usr.Deaf = true).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
await channel.SendMessageAsync("Deafen successful").ConfigureAwait(false);
|
await channel.SendMessageAsync("🔇 Deafen successful").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -563,11 +563,11 @@ namespace NadekoBot.Modules.Administration
|
|||||||
{
|
{
|
||||||
await u.ModifyAsync(usr=> usr.Deaf = false).ConfigureAwait(false);
|
await u.ModifyAsync(usr=> usr.Deaf = false).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
await channel.SendMessageAsync("Undeafen successful").ConfigureAwait(false);
|
await channel.SendMessageAsync("🔊 Undeafen successful").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ I most likely don't have the permission necessary for that.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -577,7 +577,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
public async Task DelVoiChanl(IUserMessage umsg, [Remainder] IVoiceChannel voiceChannel)
|
public async Task DelVoiChanl(IUserMessage umsg, [Remainder] IVoiceChannel voiceChannel)
|
||||||
{
|
{
|
||||||
await voiceChannel.DeleteAsync().ConfigureAwait(false);
|
await voiceChannel.DeleteAsync().ConfigureAwait(false);
|
||||||
await umsg.Channel.SendMessageAsync($"Removed channel **{voiceChannel.Name}**.").ConfigureAwait(false);
|
await umsg.Channel.SendMessageAsync($"❗️Removed channel **{voiceChannel.Name}**.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
@ -587,7 +587,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
{
|
{
|
||||||
var channel = (ITextChannel)umsg.Channel;
|
var channel = (ITextChannel)umsg.Channel;
|
||||||
var ch = await channel.Guild.CreateVoiceChannelAsync(channelName).ConfigureAwait(false);
|
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]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
@ -596,7 +596,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
public async Task DelTxtChanl(IUserMessage umsg, [Remainder] ITextChannel channel)
|
public async Task DelTxtChanl(IUserMessage umsg, [Remainder] ITextChannel channel)
|
||||||
{
|
{
|
||||||
await channel.DeleteAsync().ConfigureAwait(false);
|
await channel.DeleteAsync().ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync($"Removed text channel **{channel.Name}**, id `{channel.Id}`.").ConfigureAwait(false);
|
await channel.SendMessageAsync($"❗️Removed text channel **{channel.Name}**, ID `{channel.Id}`.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
@ -606,7 +606,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
{
|
{
|
||||||
var channel = (ITextChannel)umsg.Channel;
|
var channel = (ITextChannel)umsg.Channel;
|
||||||
var txtCh = await channel.Guild.CreateTextChannelAsync(channelName).ConfigureAwait(false);
|
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]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
@ -617,7 +617,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
var channel = (ITextChannel)umsg.Channel;
|
var channel = (ITextChannel)umsg.Channel;
|
||||||
topic = topic ?? "";
|
topic = topic ?? "";
|
||||||
await channel.ModifyAsync(c => c.Topic = topic);
|
await channel.ModifyAsync(c => c.Topic = topic);
|
||||||
await channel.SendMessageAsync(":ok: **New channel topic set.**").ConfigureAwait(false);
|
await channel.SendMessageAsync("🆗 **New channel topic set.**").ConfigureAwait(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
@ -628,7 +628,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
var channel = (ITextChannel)umsg.Channel;
|
var channel = (ITextChannel)umsg.Channel;
|
||||||
|
|
||||||
await channel.ModifyAsync(c => c.Name = name).ConfigureAwait(false);
|
await channel.ModifyAsync(c => c.Name = name).ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync(":ok: **New channel name set.**").ConfigureAwait(false);
|
await channel.SendMessageAsync("🆗 **New channel name set.**").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -677,7 +677,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
{
|
{
|
||||||
var channel = (ITextChannel)umsg.Channel;
|
var channel = (ITextChannel)umsg.Channel;
|
||||||
|
|
||||||
try { await channel.SendMessageAsync("`Shutting down.`").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); }
|
try { await channel.SendMessageAsync("ℹ️ **Shutting down.**").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); }
|
||||||
await Task.Delay(2000).ConfigureAwait(false);
|
await Task.Delay(2000).ConfigureAwait(false);
|
||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
}
|
}
|
||||||
@ -693,7 +693,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
|
|
||||||
await (await NadekoBot.Client.GetCurrentUserAsync()).ModifyAsync(u => u.Username = newName).ConfigureAwait(false);
|
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]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
@ -718,7 +718,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await channel.SendMessageAsync("New avatar set.").ConfigureAwait(false);
|
await channel.SendMessageAsync("🆒 **New avatar set.**").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
@ -732,7 +732,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
|
|
||||||
await NadekoBot.Client.SetGame(game).ConfigureAwait(false);
|
await NadekoBot.Client.SetGame(game).ConfigureAwait(false);
|
||||||
|
|
||||||
await channel.SendMessageAsync("`New game set.`").ConfigureAwait(false);
|
await channel.SendMessageAsync("👾 **New game set.**").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
@ -746,7 +746,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
|
|
||||||
await NadekoBot.Client.SetStream(name, url).ConfigureAwait(false);
|
await NadekoBot.Client.SetStream(name, url).ConfigureAwait(false);
|
||||||
|
|
||||||
await channel.SendMessageAsync("`New stream set.`").ConfigureAwait(false);
|
await channel.SendMessageAsync("ℹ️ **New stream set.**").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
@ -790,7 +790,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("`Invalid format.`").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ Invalid format.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -805,10 +805,10 @@ namespace NadekoBot.Modules.Administration
|
|||||||
g.GetDefaultChannelAsync()
|
g.GetDefaultChannelAsync()
|
||||||
)).ConfigureAwait(false);
|
)).ConfigureAwait(false);
|
||||||
|
|
||||||
await Task.WhenAll(channels.Select(c => c.SendMessageAsync($"`Message from {umsg.Author} (Bot Owner):` " + message)))
|
await Task.WhenAll(channels.Select(c => c.SendMessageAsync($"🆕 **Message from {umsg.Author} (Bot Owner):** " + message)))
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
await channel.SendMessageAsync(":ok:").ConfigureAwait(false);
|
await channel.SendMessageAsync("🆗").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
@ -851,7 +851,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
{
|
{
|
||||||
var channel = (ITextChannel)umsg.Channel;
|
var channel = (ITextChannel)umsg.Channel;
|
||||||
|
|
||||||
string send = $"--{umsg.Author.Mention} has invoked a mention on the following roles--";
|
string send = $"❕{umsg.Author.Mention} has invoked a mention on the following roles❕";
|
||||||
foreach (var role in roles)
|
foreach (var role in roles)
|
||||||
{
|
{
|
||||||
send += $"\n`{role.Name}`\n";
|
send += $"\n`{role.Name}`\n";
|
||||||
|
@ -31,13 +31,13 @@ namespace NadekoBot.Modules.Administration
|
|||||||
|
|
||||||
if (server == null)
|
if (server == null)
|
||||||
{
|
{
|
||||||
await channel.SendMessageAsync("Cannot find that server").ConfigureAwait(false);
|
await channel.SendMessageAsync("⚠️ Cannot find that server").ConfigureAwait(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (server.OwnerId != _client.GetCurrentUser().Id)
|
if (server.OwnerId != _client.GetCurrentUser().Id)
|
||||||
{
|
{
|
||||||
await server.LeaveAsync().ConfigureAwait(false);
|
await server.LeaveAsync().ConfigureAwait(false);
|
||||||
await channel.SendMessageAsync("Left server " + server.Name).ConfigureAwait(false);
|
await channel.SendMessageAsync("✅ Left server " + server.Name).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -47,4 +47,4 @@ namespace NadekoBot.Modules.Administration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,14 +61,15 @@ namespace NadekoBot.Services.Impl
|
|||||||
public async Task<string> Print()
|
public async Task<string> Print()
|
||||||
{
|
{
|
||||||
var curUser = await client.GetCurrentUserAsync();
|
var curUser = await client.GetCurrentUserAsync();
|
||||||
return $@"`Author: Kwoth` `Library: Discord.Net`
|
return $@"```css
|
||||||
`Bot Version: {BotVersion}`
|
Author: [Kwoth#2560] | Library: [Discord.Net]
|
||||||
`Bot id: {curUser.Id}`
|
Bot Version: [{BotVersion}]
|
||||||
`Owners' Ids: {string.Join(", ", NadekoBot.Credentials.OwnerIds)}`
|
Bot id: {curUser.Id}
|
||||||
`Uptime: {GetUptimeString()}`
|
Owners Ids: {string.Join(", ", NadekoBot.Credentials.OwnerIds)}
|
||||||
`Servers: {client.GetGuilds().Count} | TextChannels: {client.GetGuilds().SelectMany(g => g.GetChannels().Where(c => c is ITextChannel)).Count()} | VoiceChannels: {client.GetGuilds().SelectMany(g => g.GetChannels().Where(c => c is IVoiceChannel)).Count()}`
|
Uptime: {GetUptimeString()}
|
||||||
`Commands Ran this session: {commandsRan}`
|
Servers: {client.GetGuilds().Count} | TextChannels: {client.GetGuilds().SelectMany(g => g.GetChannels().Where(c => c is ITextChannel)).Count()} | VoiceChannels: {client.GetGuilds().SelectMany(g => g.GetChannels().Where(c => c is IVoiceChannel)).Count()}
|
||||||
`Messages: {messageCounter} ({messageCounter / (double)GetUptime().TotalSeconds:F2}/sec)` `Heap: {Heap} MB`";
|
Commands Ran this session: {commandsRan}
|
||||||
|
Messages: {messageCounter} [{messageCounter / (double)GetUptime().TotalSeconds:F2}/sec] Heap: [{Heap} MB]```";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task Reset()
|
public Task Reset()
|
||||||
|
Loading…
Reference in New Issue
Block a user