Add SocketUser.MutualGuilds + various command ext. methods. (#1037)
* Add SocketUser.MutualGuilds + various ext. methods. * Search through submodules for GetExecutableCommandAsync * Allow GetExecutableCommandsAsync(ModuleInfo) to recurse properly to all submodules. * Bump down lang. version & whitespace cleanup. * Change to use Task.WhenAll * Change to ICollection<CommandInfo> * Resolve build errors.
This commit is contained in:
committed by
Christopher F
parent
649a779c23
commit
637d9fc794
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Discord
|
||||
{
|
||||
@@ -65,5 +67,15 @@ namespace Discord
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static EmbedBuilder WithFields(this EmbedBuilder builder, IEnumerable<EmbedFieldBuilder> fields)
|
||||
{
|
||||
foreach (var field in fields)
|
||||
builder.AddField(field);
|
||||
|
||||
return builder;
|
||||
}
|
||||
public static EmbedBuilder WithFields(this EmbedBuilder builder, params EmbedFieldBuilder[] fields)
|
||||
=> WithFields(builder, fields.AsEnumerable());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user