<commit_before>package me.noud02.akatsuki.commands

import me.noud02.akatsuki.annotations.Load
import me.noud02.akatsuki.annotations.Perm
import me.noud02.akatsuki.entities.Command
import me.noud02.akatsuki.entities.Context
import me.noud02.akatsuki.music.MusicManager
import me.noud02.akatsuki.utils.I18n
import net.dv8tion.jda.core.Permission

@Load
@Perm(Permission.MANAGE_SERVER)
class Stop : Command() {
    override fun run(ctx: Context) {
        val manager = MusicManager.musicManagers[ctx.guild!!.id] ?: return ctx.send("Not connected!")

        manager.player.stopTrack()

        ctx.send(I18n.parse(ctx.lang.getString("song_stop_success"), mapOf("username" to ctx.author.name)))
    }
}<commit_msg>stop command now also destroys the music player<commit_after>package me.noud02.akatsuki.commands

import me.noud02.akatsuki.annotations.Load
import me.noud02.akatsuki.annotations.Perm
import me.noud02.akatsuki.entities.Command
import me.noud02.akatsuki.entities.Context
import me.noud02.akatsuki.music.MusicManager
import me.noud02.akatsuki.utils.I18n
import net.dv8tion.jda.core.Permission

@Load
@Perm(Permission.MANAGE_SERVER)
class Stop : Command() {
    override fun run(ctx: Context) {
        if (MusicManager.musicManagers[ctx.guild!!.id] == null)
            return ctx.send("Not connected!")

        MusicManager.leave(ctx.guild.id)

        ctx.send(I18n.parse(ctx.lang.getString("song_stop_success"), mapOf("username" to ctx.author.name)))
    }
}
{'fraction_non_alphanumeric': 0.12092391304347826, 'fraction_numerical': 0.025815217391304348, 'mean_word_length': 4.579545454545454, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7584312', 'n_tokens_mistral': 530, 'n_tokens_neox': 503, 'n_words': 79}