Class StandaloneDiscordPlatform
java.lang.Object
net.lucypoulton.squirtgun.discord.DiscordPlatform
net.lucypoulton.squirtgun.discord.standalone.StandaloneDiscordPlatform
- All Implemented Interfaces:
net.lucypoulton.squirtgun.platform.Platform
A Platform implementation for standalone Discord bots.
-
Constructor Summary
ConstructorDescriptionStandaloneDiscordPlatform(net.dv8tion.jda.api.JDA jda, String commandPrefix)
-
Method Summary
Modifier and TypeMethodDescriptiongetConfigPath(net.lucypoulton.squirtgun.plugin.SquirtgunPlugin<?> plugin)
net.lucypoulton.squirtgun.platform.audience.SquirtgunUser
net.lucypoulton.squirtgun.platform.event.EventManager
@Nullable DiscordUser
Fetches a user by their Discord username and discriminator, in the formatusername#0000
, where the username must be between 2 and 32 characters (inclusive) matching the exact casing and the discriminator must be exactly 4 digits.Gets a DiscordUser from a user's Minecraft UUID.net.lucypoulton.squirtgun.platform.scheduler.TaskScheduler
Methods inherited from class net.lucypoulton.squirtgun.discord.DiscordPlatform
audiences, getAuthMode, getOnlinePlayers, jda, log, name, registerCommand
-
Constructor Details
-
StandaloneDiscordPlatform
-
-
Method Details
-
getPlayer
Description copied from class:DiscordPlatform
Gets a DiscordUser from a user's Minecraft UUID.- Specified by:
getPlayer
in interfacenet.lucypoulton.squirtgun.platform.Platform
- Specified by:
getPlayer
in classDiscordPlatform
- Parameters:
uuid
- the UUID of the player to get- Returns:
- a SquirtgunPlayer if the user is known and has a linked Discord account, otherwise null
-
getPlayer
Fetches a user by their Discord username and discriminator, in the formatusername#0000
, where the username must be between 2 and 32 characters (inclusive) matching the exact casing and the discriminator must be exactly 4 digits.- Specified by:
getPlayer
in interfacenet.lucypoulton.squirtgun.platform.Platform
- Specified by:
getPlayer
in classDiscordPlatform
- Parameters:
name
- the name of the player to get- Returns:
- a SquirtgunPlayer if the user is known has a linked Discord account, otherwise null
-
getLogger
-
getTaskScheduler
public net.lucypoulton.squirtgun.platform.scheduler.TaskScheduler getTaskScheduler() -
getEventManager
public net.lucypoulton.squirtgun.platform.event.EventManager getEventManager() -
getConsole
public net.lucypoulton.squirtgun.platform.audience.SquirtgunUser getConsole() -
getConfigPath
-