Compare commits

..

1 Commits

Author SHA1 Message Date
e847c1579a Update readme.md 2024-10-25 21:51:44 +02:00

View File

@@ -10,22 +10,25 @@ flowchart TD
```mermaid ```mermaid
sequenceDiagram sequenceDiagram
participant User as User participant User
participant DiscordSocketClient as DiscordSocketClient participant Bot
participant MessageReceivedHandler as MessageReceivedHandler participant DiscordSocketClient
participant MessageReceivedNotification as MessageReceivedNotification participant IAudioService
participant EmbedBuilder as EmbedBuilder participant SocketSlashCommand
participant Channel as Channel participant LavalinkPlayer
User->>DiscordSocketClient: Send message "!LunarisStats" User->>Bot: /play [song]
DiscordSocketClient->>MessageReceivedHandler: MessageReceivedNotification Bot->>DiscordSocketClient: Get user voice channel
MessageReceivedHandler->>MessageReceivedNotification: Handle(notification, cancellationToken) DiscordSocketClient-->>Bot: Voice channel info
MessageReceivedNotification->>MessageReceivedHandler: BotMentioned(notification, cancellationToken) Bot->>IAudioService: Get or create player
MessageReceivedHandler->>DiscordSocketClient: Get guilds and voice channels IAudioService-->>Bot: Player instance
DiscordSocketClient-->>MessageReceivedHandler: List of guilds and voice channels Bot->>SocketSlashCommand: Get search query
MessageReceivedHandler->>EmbedBuilder: Create embed with statistics SocketSlashCommand-->>Bot: Search query
EmbedBuilder-->>MessageReceivedHandler: Embed Bot->>IAudioService: Load tracks
MessageReceivedHandler->>Channel: Send embed message IAudioService-->>Bot: Track collection
Bot->>LavalinkPlayer: Play track
LavalinkPlayer-->>Bot: Track started
Bot->>User: Now playing embed
``` ```
## Steps in the code ## Steps in the code