Implement welcome message channels (#819)

This commit is contained in:
Chris Johnston
2017-09-23 14:00:08 -07:00
committed by Christopher F
parent e25054bb3b
commit 30e867a183
7 changed files with 53 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ namespace Discord.Rest
{
AfkChannelId = args.AfkChannelId,
AfkTimeout = args.AfkTimeout,
SystemChannelId = args.SystemChannelId,
DefaultMessageNotifications = args.DefaultMessageNotifications,
Icon = args.Icon.IsSpecified ? args.Icon.Value?.ToModel() : Optional.Create<ImageModel?>(),
Name = args.Name,
@@ -39,6 +40,11 @@ namespace Discord.Rest
else if (args.AfkChannelId.IsSpecified)
apiArgs.AfkChannelId = args.AfkChannelId.Value;
if (args.SystemChannel.IsSpecified)
apiArgs.SystemChannelId = args.SystemChannel.Value.Id;
else if (args.SystemChannelId.IsSpecified)
apiArgs.SystemChannelId = args.SystemChannelId.Value;
if (args.Owner.IsSpecified)
apiArgs.OwnerId = args.Owner.Value.Id;
else if (args.OwnerId.IsSpecified)