public async Task Invite() { SocketTextChannel stc = this.Context.Channel as SocketTextChannel; if (stc != default) { RestInviteMetadata invite = await stc.CreateInviteAsync( 86400, 1, false, true); await this.Context.DebugPublicReleasePrivate(invite.Url, false); await this.Context.Message.AddReactionAsync(new Emoji("👍")); } else { await this.Context.Message.AddReactionAsync(new Emoji("❓")); } }
public async Task InviteAsync(SocketTextChannel channel, bool temporary = true) { var invite = await channel.CreateInviteAsync(isTemporary : temporary); await ReplyAsync(Context.User.Mention + " here ya go: " + invite.Url); }