Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
@ -638,9 +638,9 @@ namespace NadekoBot.Modules.Administration
|
||||
public async Task Prune(IUserMessage umsg)
|
||||
{
|
||||
var channel = (ITextChannel)umsg.Channel;
|
||||
|
||||
|
||||
var user = channel.Guild.GetCurrentUser();
|
||||
|
||||
|
||||
var enumerable = (await umsg.Channel.GetMessagesAsync()).AsEnumerable();
|
||||
enumerable = enumerable.Where(x => x.Author.Id == user.Id);
|
||||
await umsg.Channel.DeleteMessagesAsync(enumerable);
|
||||
|
@ -159,7 +159,7 @@ namespace NadekoBot.Modules.CustomReactions
|
||||
{
|
||||
var txtStream = await customReactions.GroupBy(cr => cr.Trigger)
|
||||
.OrderBy(cr => cr.Key)
|
||||
.Select(cr => new { Trigger = cr.Key, Responses = cr.Count() })
|
||||
.Select(cr => new { Trigger = cr.Key, Responses = cr.Select(y => y.Response).ToList() })
|
||||
.ToJson()
|
||||
.ToStream()
|
||||
.ConfigureAwait(false);
|
||||
@ -173,7 +173,7 @@ namespace NadekoBot.Modules.CustomReactions
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
public async Task ListCustReactG(IUserMessage imsg, int page = 1)
|
||||
{
|
||||
var channel = (ITextChannel)imsg.Channel;
|
||||
var channel = imsg.Channel as ITextChannel;
|
||||
if (page < 1 || page > 10000)
|
||||
return;
|
||||
ConcurrentHashSet<CustomReaction> customReactions;
|
||||
|
@ -535,7 +535,7 @@ namespace NadekoBot.Modules.Searches
|
||||
if (matches.Count == 0)
|
||||
return null;
|
||||
var match = matches[rng.Next(0, matches.Count)];
|
||||
return matches[rng.Next(0, matches.Count)].Groups["url"].Value;
|
||||
return "http:" + matches[rng.Next(0, matches.Count)].Groups["url"].Value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,8 @@ __`Users:`__ **{(await ch.GetUsersAsync()).Count()}**";
|
||||
🗓 __`Joined Discord:`__ **{user.CreatedAt.ToString("dd.MM.yyyy HH:mm")}**
|
||||
⚔ __`Roles:`__ **({user.Roles.Count()}) - {string.Join(", ", user.Roles.Select(r => r.Name)).SanitizeMentions()}**";
|
||||
if (!string.IsNullOrWhiteSpace(user.AvatarUrl))
|
||||
toReturn += $@"📷 __`Avatar URL:`__ **{await NadekoBot.Google.ShortenUrl(user.AvatarUrl).ConfigureAwait(false)}**";
|
||||
toReturn += $@"
|
||||
📷 __`Avatar URL:`__ **{await NadekoBot.Google.ShortenUrl(user.AvatarUrl).ConfigureAwait(false)}**";
|
||||
await msg.Reply(toReturn).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user