essential commit
This commit is contained in:
parent
dd5f5c415c
commit
370fc22f05
@ -12,7 +12,7 @@ namespace NadekoBot
|
|||||||
{
|
{
|
||||||
public class NadekoStats
|
public class NadekoStats
|
||||||
{
|
{
|
||||||
public string BotVersion = "0.8-beta5";
|
public string BotVersion = "0.8-beta6";
|
||||||
|
|
||||||
private static readonly NadekoStats _instance = new NadekoStats();
|
private static readonly NadekoStats _instance = new NadekoStats();
|
||||||
public static NadekoStats Instance => _instance;
|
public static NadekoStats Instance => _instance;
|
||||||
|
@ -505,16 +505,16 @@ namespace NadekoBot.Modules {
|
|||||||
await e.Send("Failed. Make sure you've specified server and [channel or user]");
|
await e.Send("Failed. Make sure you've specified server and [channel or user]");
|
||||||
});
|
});
|
||||||
|
|
||||||
cgb.CreateCommand(".menrol")
|
cgb.CreateCommand(".menrole")
|
||||||
.Alias(".mentionrole")
|
.Alias(".mentionrole")
|
||||||
.Description("Mentions every person from the provided role or roles (separated by a ',') on this server. Requires you to have mention @everyone permission.")
|
.Description("Mentions every person from the provided role or roles (separated by a ',') on this server. Requires you to have mention @everyone permission.")
|
||||||
.Parameter("roles", ParameterType.Unparsed)
|
.Parameter("roles", ParameterType.Unparsed)
|
||||||
.Do(async e => {
|
.Do(async e => {
|
||||||
if (!e.User.ServerPermissions.MentionEveryone) return;
|
if (!e.User.ServerPermissions.MentionEveryone) return;
|
||||||
var arg = e.GetArg("roles");
|
var arg = e.GetArg("roles").Split(',').Select(r => r.Trim());
|
||||||
string send = $"--{e.User.Mention} has invoked a mention on the following roles--";
|
string send = $"--{e.User.Mention} has invoked a mention on the following roles--";
|
||||||
foreach (var roleStr in e.Args) {
|
foreach (var roleStr in arg) {
|
||||||
if (roleStr == null) continue;
|
if (string.IsNullOrWhiteSpace(roleStr)) continue;
|
||||||
var role = e.Server.FindRoles(roleStr).FirstOrDefault();
|
var role = e.Server.FindRoles(roleStr).FirstOrDefault();
|
||||||
if (role == null) continue;
|
if (role == null) continue;
|
||||||
send += $"\n`{role.Name}`\n";
|
send += $"\n`{role.Name}`\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user