forked from Fascinated/Bat
ples bby gurl
This commit is contained in:
parent
11299b3ca7
commit
5e17f655a4
@ -64,10 +64,15 @@ public abstract class BatCommand {
|
|||||||
if (info.isUserInstall()) {
|
if (info.isUserInstall()) {
|
||||||
integrationTypes.add(IntegrationType.USER_INSTALL);
|
integrationTypes.add(IntegrationType.USER_INSTALL);
|
||||||
}
|
}
|
||||||
|
List<InteractionContextType> contextTypes = new ArrayList<>();
|
||||||
|
if (info.isGuildOnly()) {
|
||||||
|
contextTypes.add(InteractionContextType.GUILD);
|
||||||
|
} else {
|
||||||
|
contextTypes.addAll(List.of(InteractionContextType.values()));
|
||||||
|
}
|
||||||
commandData = new CommandDataImpl(info.getName(), info.getDescription())
|
commandData = new CommandDataImpl(info.getName(), info.getDescription())
|
||||||
.setContexts(InteractionContextType.ALL)
|
.setContexts(contextTypes)
|
||||||
.setIntegrationTypes(integrationTypes)
|
.setIntegrationTypes(integrationTypes);
|
||||||
.setGuildOnly(!getInfo().isUserInstall() && getInfo().isGuildOnly());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user