mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-28 08:38:52 +00:00
[AB-200] fixing link embeds not working for users who left the server
fixing some issues with optional dependencies (autowired creates null instances etc) fixing roll and roulette using not the proper default values fixing setPrefix not creating an instance, in case it originated from a default config fixing too many configuration properties in utility
This commit is contained in:
@@ -42,7 +42,7 @@ public class Roll extends AbstractConditionableCommand {
|
||||
@Override
|
||||
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
|
||||
List<Object> parameters = commandContext.getParameters().getParameters();
|
||||
Integer high = configService.getLongValue(EntertainmentFeature.ROLL_DEFAULT_HIGH_KEY, commandContext.getGuild().getIdLong()).intValue();
|
||||
Integer high = configService.getLongValueOrConfigDefault(EntertainmentFeature.ROLL_DEFAULT_HIGH_KEY, commandContext.getGuild().getIdLong()).intValue();
|
||||
Integer low = 1;
|
||||
if(parameters.size() > 1) {
|
||||
low = (Integer) parameters.get(1);
|
||||
|
||||
@@ -45,7 +45,7 @@ public class EntertainmentServiceBean implements EntertainmentService {
|
||||
|
||||
@Override
|
||||
public boolean executeRoulette(Member memberExecuting) {
|
||||
Long possibilities = configService.getLongValue(EntertainmentFeature.ROULETTE_BULLETS_CONFIG_KEY, memberExecuting.getGuild().getIdLong());
|
||||
Long possibilities = configService.getLongValueOrConfigDefault(EntertainmentFeature.ROULETTE_BULLETS_CONFIG_KEY, memberExecuting.getGuild().getIdLong());
|
||||
// 1/possibilities of chance, we don't have a state, each time its reset
|
||||
return secureRandom.nextInt(possibilities.intValue()) == 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user