Ejemplo n.º 1
0
        internal void Update(Model model, ulong guildId)
        {
            this.Name    = model.Name;
            this.guildId = guildId;

            this.Options = model.Options.IsSpecified
                ? model.Options.Value.Select(x => new SocketInteractionDataOption(x, this.Discord, guildId)).ToImmutableArray().ToReadOnlyCollection()
                : null;
        }
Ejemplo n.º 2
0
 internal virtual async Task UpdateAsync(DiscordRestClient client, Model model, RestGuild guild, IRestMessageChannel channel, bool doApiCall)
 {
     Name = model.Name;
     if (model.Resolved.IsSpecified && ResolvableData == null)
     {
         ResolvableData = new RestResolvableData <Model>();
         await ResolvableData.PopulateAsync(client, guild, channel, model, doApiCall).ConfigureAwait(false);
     }
 }
        internal SocketCommandBaseData(DiscordSocketClient client, Model model, ulong?guildId)
            : base(client, model.Id)
        {
            Type = model.Type;

            if (model.Resolved.IsSpecified)
            {
                ResolvableData = new SocketResolvableData <Model>(client, guildId, model);
            }
        }
Ejemplo n.º 4
0
        internal static new async Task <RestSlashCommandData> CreateAsync(DiscordRestClient client, Model model, RestGuild guild, IRestMessageChannel channel)
        {
            var entity = new RestSlashCommandData(client, model);
            await entity.UpdateAsync(client, model, guild, channel).ConfigureAwait(false);

            return(entity);
        }
Ejemplo n.º 5
0
 internal RestSlashCommandData(DiscordRestClient client, Model model)
     : base(client, model)
 {
 }
Ejemplo n.º 6
0
 internal RestMessageCommandData(DiscordRestClient client, Model model)
     : base(client, model)
 {
 }
 internal SocketUserCommandData(DiscordSocketClient client, Model model, ulong?guildId)
     : base(client, model, guildId)
 {
 }
        internal new static SocketMessageCommandData Create(DiscordSocketClient client, Model model, ulong id, ulong?guildId)
        {
            var entity = new SocketMessageCommandData(client, model, guildId);

            entity.Update(model);
            return(entity);
        }
Ejemplo n.º 9
0
 internal virtual void Update(Model model)
 {
     Name = model.Name;
 }
Ejemplo n.º 10
0
 internal RestCommandBaseData(BaseDiscordClient client, Model model)
     : base(client, model.Id)
 {
 }