protected Personnage(Game game, DiscordMember me, DiscordGuildEmoji emoji) { Me = me; Emoji = emoji; Alive = true; Game = game; var name = Me.Username.RemoveSpecialChars() ?? "jesaispasquoi"; ChannelV = Game.Guild.CreateChannelAsync(Me.Username.RemoveSpecialChars(), ChannelType.Voice, Game.DiscordChannels[GameChannel.PersoGroup]).GetAwaiter().GetResult(); ChannelT = Game.Guild.CreateChannelAsync(Me.Username.RemoveSpecialChars(), ChannelType.Text, Game.DiscordChannels[GameChannel.PersoGroup]).GetAwaiter().GetResult(); // ReSharper disable once VirtualMemberCallInConstructor ChannelT.AddOverwriteAsync(Me, GameBuilder.UsrPerms); ChannelV.AddOverwriteAsync(Me, GameBuilder.UsrPerms); Game.DiscordChannels[GameChannel.TownText].AddOverwriteAsync(Me, GameBuilder.UsrPerms); Game.DiscordChannels[GameChannel.TownVoice].AddOverwriteAsync(Me, GameBuilder.UsrPerms); var embed = new DiscordEmbedBuilder { Title = Game.Texts.RoleString, Color = Color.InfoColor }; embed.AddField("Role", ToString()); ChannelT.SendMessageAsync(embed: embed.Build()).GetAwaiter().GetResult(); me.PlaceInAsync(ChannelV); }
protected Personnage(DiscordMember me, DiscordGuildEmoji emoji) { Id = me.Id; Emoji = emoji; Alive = true; //NbPoints = GetNbPoints(me.Id); // TODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODOTODO ChannelV = Global.Game.Guild.CreateChannelAsync(Me.Username.RemoveSpecialChars(), ChannelType.Voice, Global.Game.DiscordChannels[GameChannel.PersoGroup]).GetAwaiter().GetResult(); ChannelT = Global.Game.Guild.CreateChannelAsync(Me.Username.RemoveSpecialChars(), ChannelType.Text, Global.Game.DiscordChannels[GameChannel.PersoGroup]).GetAwaiter().GetResult(); ChannelT.AddOverwriteAsync(Me, GameBuilder.UsrPerms); ChannelV.AddOverwriteAsync(Me, GameBuilder.UsrPerms); Global.Game.DiscordChannels[GameChannel.TownText].AddOverwriteAsync(Me, GameBuilder.UsrPerms); Global.Game.DiscordChannels[GameChannel.TownVoice].AddOverwriteAsync(Me, GameBuilder.UsrPerms); var embed = new DiscordEmbedBuilder { Title = Global.Game.Texts.GameRoles.RoleString, Color = Color.InfoColor }; embed.AddField("Role", ToString()); ChannelT.SendMessageAsync(embed: embed.Build()).GetAwaiter().GetResult(); me.PlaceInAsync(ChannelV); }