Skip to content

Edit Entities for Create and Modify to use individual builders

Created by: jeffreyladd

Summary

Updates many of the Create/Modify Entities to use builders. I also have seperated the builders so they only do Modify or Create.

Changes Done

  1. DiscordGuild Create
    1. Adds missing params on the Create Payload
    2. Simplifies the API to use a builder/Action of a Builder.
    3. Centralizes the validation
  2. DiscordGuild Modify
    1. Adds missing params on the modify payload
    2. Simplifies the API to use a builder and reduces the Methods.
    3. Centralizes the validation
  3. DiscordChannel Create
    1. Simplifies the API to use a builder and also reduces the amount over Methods and overloads to do one task.
    2. Centralizes the validation
  4. DiscordChannel Modify
    1. Simplifies the API to use a builder and also reduces the amount over Methods and overloads to do one task.
    2. Centralizes the validation
  5. DiscordRole Create
    1. Simplifies the API to use a builder and also reduces the amount over Methods and overloads to do one task.
    2. Centralizes the validation
  6. DiscordRole Modify
    1. Simplifies the API to use a builder and also reduces the amount over Methods and overloads to do one task.
    2. Centralizes the validation
  7. DiscordMember Modify
    1. Simplifies the API to use a builder and also reduces the amount over Methods and overloads to do one task.
    2. Centralizes the validation
  8. Gluid Membership screening Modify
    1. Simplifies the API to use a builder and also reduces the amount over Methods and overloads to do one task.
    2. Centralizes the validation

Tests Done

  1. Wrote Tests that validate the Guild Create Using the Builder. Also wrote Tests that validate the Guild Create using an action of a builder.
    1. There is a bug on the discord API side where passing a system_channel_id or afk_channel_id will cause a Server Exception. This is due to them not handling the mapping correctly.
  2. Wrote Tests that validate the Guild Modify Using the Builder. Also wrote Tests that validate the Guild Modifyusing an action of a builder.
  3. Wrote and organized tests that validate everything you can do with the MessageCreate Builder and MessageModifyBuilder.
  4. Wrote Tests that validate the Channel Create using the Builder. Also wrote tests that validate the Channel Create using an action of a builder
  5. Wrote Tests that validate the Channel Modify using the Builder. Also wrote tests that validate the Channel modify using an action of a builder
  6. Wrote Tests that validate the Role Create using the Builder. Also wrote tests that validate the Role Create using an action of a builder
  7. Wrote Tests that validate the Role Modify using the Builder. Also wrote tests that validate the Role modify using an action of a builder
  8. Wrote Tests that validate the Member Modify using the Builder. Also wrote tests that validate the Member modify using an action of a builder
  9. Wrote Tests that validate the GuildMembership Modify using the Builder. Also wrote tests that validate the GuildMembership modify using an action of a builder
    1. For this i currently dont have the facilities to test this for some reason. I keep on getting a access denied permission from discord. Dunno what that is about.

Items left to do

  1. Finish writing tests
  2. Update Documentation where we changed the logic
  3. Create Developer Documentation when it comes in terms of writing a builder and the format they should follow to make things consistent.

Merge request reports

Loading