Move command handling out of constructor, add coin reflip command
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Having heavy code run in a constructor is bad practice. We made separate methods for command handling.
This commit is contained in:
@@ -11,7 +11,7 @@ import java.util.concurrent.TimeUnit;
|
||||
public class DieCommand
|
||||
{
|
||||
|
||||
public DieCommand(@NotNull SlashCommandInteractionEvent event)
|
||||
public void runSlashCommand(@NotNull SlashCommandInteractionEvent event)
|
||||
{
|
||||
if(Configuration.getBotOwnerId() != event.getMember().getIdLong())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user