pub fn destroy(&self, guild_id: GuildId) -> Result<(), TrySendError<OutgoingEvent>> {
        if let Some(node) = self.get(&guild_id).map(|kv| kv.value().node().clone()) {
            node.send(OutgoingEvent::from(Destroy::new(guild_id)))?;
            self.players.remove(&guild_id);
        }

        Ok(())
    }
/// Destroy a player on the remote node and remove it from the [`PlayerManager`].
///
/// Returns an error if the associated node no longer is connected.
Destroy a player on the remote node and remove it from the [`PlayerManager`].
Returns an error if the associated node no longer is connected.
Destroy a player on the remote node and remove it from the [ ` PlayerManager ` ] . Returns an error if the associated node no longer is connected .
pub fn destroy(&self, guild_id: GuildId) -> Result<(), TrySendError<OutgoingEvent>> {
        if let Some(node) = self.get(&guild_id).map(|kv| kv.value().node().clone()) {
            node.send(OutgoingEvent::from(Destroy::new(guild_id)))?;
            self.players.remove(&guild_id);
        }
        Ok(())
    }
pub fn destroy ( & self , guild_id : GuildId ) -> Result < ( ) , TrySendError < OutgoingEvent > > { if let Some ( node ) = self . get ( & guild_id ) . map ( | kv | kv . value ( ) . node ( ) . clone ( ) ) { node . send ( OutgoingEvent :: from ( Destroy :: new ( guild_id ) ) ) ? ; self . players . remove ( & guild_id ) ; } Ok ( ( ) ) }
Destroy a player on the remote node and remove it from the [`PlayerManager`].
Destroy a player on the remote node and remove it from the [ ` PlayerManager ` ] .
&self
guild_id
GuildId