API Reference

ApiClient provides 150+ methods covering the entire Fluxer REST API. All methods return CompletableFuture<T> for non-blocking usage.

ApiClient api = new ApiClient("Bot YOUR_TOKEN", config);

// All calls are async
api.getCurrentUser()
    .thenAccept(user -> System.out.println(user.getUsername()))
    .exceptionally(ex -> {
        System.err.println("Error: " + ex.getMessage());
        return null;
    });

Authentication

MethodReturnsDescription
login(LoginRequest)LoginResponseAuthenticate with credentials
logout()VoidEnd current session
register(RegisterRequest)LoginResponseCreate new account
loginMfaTotp(String)LoginResponseComplete login with TOTP code
loginMfaSms(String)LoginResponseComplete login with SMS code
verifyEmail(String)VoidVerify email address
forgotPassword(String)VoidRequest password reset
resetPassword(String, String)VoidReset password with token
getSessions()List<AuthSession>List active sessions
logoutSessions(List)VoidLogout specific sessions

Messages

MethodReturnsDescription
sendMessage(long channelId, Message)MessageSend a message to a channel
getMessage(long channelId, long msgId)MessageGet a specific message
editMessage(long channelId, long msgId, Message)MessageEdit a message
deleteMessage(long channelId, long msgId)VoidDelete a message
bulkDeleteMessages(long channelId, List)VoidDelete multiple messages
getPinnedMessages(long channelId)List<Message>Get pinned messages
pinMessage(long channelId, long msgId)VoidPin a message
unpinMessage(long channelId, long msgId)VoidUnpin a message
triggerTypingIndicator(long channelId)VoidShow typing indicator
acknowledgeMessage(long channelId, long msgId)VoidMark message as read
searchChannel(long channelId, ...)SearchResultSearch messages in a channel
// Send a simple message
Message msg = new Message();
msg.setContent("Hello, world!");
api.sendMessage(channelId, msg).join();

// Send a message with an embed
Embed embed = new EmbedBuilder()
    .withTitle("Status")
    .withDescription("All systems operational")
    .withColor(0x3fb950)
    .build();
msg.setEmbeds(List.of(embed));
api.sendMessage(channelId, msg).join();

Channels

MethodReturnsDescription
getChannels(long guildId)List<Channel>List all guild channels
getChannel(long channelId)ChannelGet channel details
createChannel(long guildId, Channel)ChannelCreate a channel
updateChannel(long channelId, Channel)ChannelUpdate channel settings
deleteChannel(long channelId)VoidDelete a channel
addRecipient(long channelId, long userId)VoidAdd user to group DM
removeRecipient(long channelId, long userId)VoidRemove user from group DM
updatePermissionOverwrite(long, ChannelPermissionOverwrite)VoidSet permission overwrite
deletePermissionOverwrite(long, long)VoidRemove permission overwrite
getChannelInvites(long channelId)List<Invite>Get channel invites

Guilds

MethodReturnsDescription
getGuild(long guildId)GuildGet guild details
getCurrentUserGuilds()List<Guild>List guilds the bot is in
createGuild(Guild)GuildCreate a new guild
updateGuild(long guildId, GuildProperties)GuildUpdate guild settings
deleteGuild(long guildId)VoidDelete a guild (owner only)
getGuildAuditLog(long guildId)GuildAuditLogGet audit log
getGuildVanityUrl(long guildId)InviteGet vanity URL
updateGuildVanityUrl(long, String)InviteSet vanity URL

Members

MethodReturnsDescription
getMembers(long guildId)List<GuildMember>List guild members
getGuildMember(long guildId, long userId)GuildMemberGet a specific member
updateMember(long guildId, long userId, ...)GuildMemberUpdate member (nick, roles, etc.)
kickMember(long guildId, long userId)VoidKick a member
removeMember(long guildId, long userId)VoidRemove a member

Roles

MethodReturnsDescription
getGuildRoles(long guildId)List<GuildRole>List all roles
getGuildRole(long guildId, long roleId)GuildRoleGet a specific role
createRole(long guildId, GuildRole)GuildRoleCreate a role
updateRole(long guildId, long roleId, GuildRole)GuildRoleUpdate a role
deleteRole(long guildId, long roleId)VoidDelete a role
updateRolePositions(long guildId, List)List<GuildRole>Reorder roles

Users

MethodReturnsDescription
getCurrentUser()UserGet current bot/user
getUser(long userId)UserGet user by ID
updateCurrentUser(User)UserUpdate current user profile
getCurrentUserSettings()UserSettingsGet user settings
updateCurrentUserSettings(UserSettings)UserSettingsUpdate user settings
getFriends()List<Relationship>List friends
addFriend(long userId)VoidSend friend request
removeFriend(long userId)VoidRemove friend
getUserNote(long userId)StringGet user note
updateUserNote(long userId, String)VoidSet user note

Invites

MethodReturnsDescription
getInvite(String code)InviteGet invite details
createInvite(long channelId, ...)InviteCreate a channel invite
deleteInvite(String code)VoidDelete an invite
joinGuild(String code)InviteJoin a guild via invite
getGuildInvites(long guildId)List<Invite>List guild invites

Webhooks

MethodReturnsDescription
getChannelWebhooks(long channelId)List<WebhookInfo>List channel webhooks
createWebhook(long channelId, WebhookInfo)WebhookInfoCreate a webhook
getWebhook(long webhookId)WebhookInfoGet webhook details
updateWebhook(long webhookId, WebhookInfo)WebhookInfoUpdate a webhook
deleteWebhook(long webhookId)VoidDelete a webhook

Reactions

MethodReturnsDescription
addReaction(long channelId, long msgId, String emoji)VoidAdd a reaction
removeOwnReaction(long, long, String)VoidRemove own reaction
removeUserReaction(long, long, String, long)VoidRemove user's reaction
removeAllReactions(long channelId, long msgId)VoidRemove all reactions
removeAllReactionsForEmoji(long, long, String)VoidRemove all of specific emoji
getReactions(long, long, String)List<User>Get users who reacted

Attachments

MethodReturnsDescription
uploadAttachments(long channelId, ...)List<Attachment>Upload file attachments
deleteAttachment(long attachmentId)VoidDelete an attachment
deleteMessageAttachment(long channelId, long msgId, long)VoidDelete attachment from a message

Bans

MethodReturnsDescription
getBans(long guildId)List<GuildBan>List all bans
banMember(long guildId, long userId)VoidBan a user
unbanMember(long guildId, long userId)VoidUnban a user

Rate Limiting

Fluxer4J includes a built-in sliding-window rate limiter that automatically throttles API calls to stay within limits.

Rate limiting is enabled by default. Set enableRateLimiting(false) in FluxerConfig to disable it.
ClassDescription
RateLimitManagerManages all rate limit buckets. Access via getBucket(key)
RateLimitBucketPer-bucket state with acquireAsync(), getRemainingAsync(), resetAsync()
RateLimitConfigConfiguration for a specific bucket (max requests, window size)
RateLimitConfigsPre-configured limits for standard Fluxer endpoints
RateLimitMappingsMaps endpoint patterns to rate limit configs

Data Models (55+ classes)

All models live in fluxer4j.data.models and use Jackson annotations for JSON serialization.

CategoryModels
UserUser, UserSettings, UserProfile, ClientStatus
ChannelChannel, ChannelPermissionOverwrite, ChannelRecipient
GuildGuild, GuildProperties, GuildMember, GuildRole, GuildBan, GuildAuditLog, GuildEmoji, GuildSticker
MessageMessage, MessageRef, MessageSnapshot, Attachment, StickerItem, CallInfo
EmbedEmbed, EmbedField, EmbedAuthor, EmbedFooter, EmbedMedia, EmbedProvider
InviteInvite, Relationship
AuthAuthSession, LoginRequest, LoginResponse, BetaCode, GiftCode
ActivityActivity, ActivityEmoji, ActivityTimestamps
OtherWebhookInfo, FavoriteMeme

Enums (19 types)

All enums live in fluxer4j.data.enums.

EnumDescriptionNotable Values
PermissionsPermission flags (54+ types)Administrator, ManageChannels, SendMessages, KickMembers, BanMembers, Connect, Speak
ChannelTypeChannel type constantsDM, GUILD_TEXT, GUILD_VOICE, GROUP_DM
StatusUser statusOnline, Idle, DoNotDisturb, Offline
MessageTypeMessage typesDefault, RecipientAdd, Call, ChannelNameChange
MessageFlagsMessage flag bitsCrossposted, IsCrosspost, SuppressEmbeds, Urgent
GuildVerificationLevelGuild verificationNone, Low, Medium, High, VeryHigh
GuildMfaLevelMFA requirementsNone, Elevated
UserFlagsUser profile flagsStaff, Partner, BugHunter, PremiumEarlySupporter
PremiumTypeSubscription typeNone, NitroClassic, Nitro
RelationshipTypeRelationship typeFriend, Blocked, IncomingRequest, OutgoingRequest
InviteTypeInvite typeGuild, GroupDM
StickerFormatTypeSticker formatPNG, APNG, Lottie