refactored variable names to use var, factored out similar methods, flow should be easier to follow in commands
CreateListingCommand.java:
Factored out all methods and logic that are related to creating a message embed, sending private messages to users
refactored how the OptionType variables are defined. Started using var type.
Updated List images to store image URL and optiontype
factored out helper methods that are used to reformat parameters used to create a listing
onButtonInteraction logic is now handled properly, Variables are initialized only when needed now
CreateTradingChannel.java:
Factored createTradingChannel() method to a new class. The reason is that this method will be used in my CreateNewTradingChannelCommand.java command class.
MessageBuilder.java:
Created this class to handle all discord logic related to sending messages and creating Embed objects
Factored out toMessageEmbed() to this class since it's used in multiple classes
Same with sendPrivateMessage()
NewGuildJoined.java:
Factored out CreateTradingChannel() to MessageBuilder.java
Updated logic in for loop
NewMember.java:
Updated to used classes that were factored out above
ViewMyListingCommand.java:
Factored out toMessageEmbed to MessageBuilder.java
ListingController.java:
Reordered Listing builder to follow order of listing model
Refactored createListing and createListingFields to return builder immediately
UserController.java
Stores Listing Object now when a user is working on a temp listing
User.java:
Removed createListingAsString. This is now built out in createListingCommand
ListingFields.java:
Updated cost to store the field name and value in a list rather than builder the field name while building the embed.
Still need to implement testing. Wanted to push this since code now builds and runs properly. Needed to push in-order for the rest of the team to be able to update their pieces.
refactored variable names to use var, factored out similar methods, flow should be easier to follow in commands
CreateListingCommand.java:
CreateTradingChannel.java:
MessageBuilder.java:
NewGuildJoined.java:
NewMember.java:
ViewMyListingCommand.java:
ListingController.java:
UserController.java
User.java:
ListingFields.java:
Still need to implement testing. Wanted to push this since code now builds and runs properly. Needed to push in-order for the rest of the team to be able to update their pieces.