EasyMusicBot class

SUPER EASY Bot Builder - Create a music bot in 5 lines!

Example:

final bot = EasyMusicBot(
  lavalinkHost: 'localhost',
  lavalinkPort: 2333,
  lavalinkPassword: 'youshallnotpass',
  botUserId: 'YOUR_BOT_ID',
);
await bot.start();

// Handle messages
final response = await bot.handleMessage(
  message: '!play never gonna give you up',
  userId: 'USER_ID',
  guildId: 'GUILD_ID',
  channelId: 'CHANNEL_ID',
);

Constructors

EasyMusicBot({required String lavalinkHost, required int lavalinkPort, required String lavalinkPassword, required String botUserId, String prefix = '!', bool autoQueue = true, bool djMode = false, List<String> djRoles = const [], bool useSSL = false})
Create a music bot with minimal configuration

Properties

autoQueue bool
final
client LavalinkClient
Get Lavalink client (for advanced usage)
no setter
djMode bool
final
djRoles List<String>
final
events Stream
Get bot events stream
no setter
framework MusicBotFramework
Get framework (for advanced usage)
no setter
hashCode int
The hash code for this object.
no setterinherited
isRunning bool
Check if bot is running
no setter
lavalinkEvents Stream
Get Lavalink events stream
no setter
prefix String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getManager(String guildId) AdvancedPlayerManager
Get player manager for guild
getPlayer(String guildId) → dynamic
Get player for guild
getServerInfo() Future
Get server info
getServerStats() Future
Get server stats
handleMessage({required String message, required String userId, required String guildId, required String channelId, List<String> userRoles = const []}) Future<String?>
Handle incoming message and get response
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerCommand(String name, dynamic handler) → void
Register custom command
Search for music
searchAll(String query) Future<Map<String, List>>
Search across all sources
start() Future<void>
Start the bot
stop() Future<void>
Stop the bot
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited