Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (39)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

Sur d’autres sites (2211)

  • (FIXED) How do I make my discord.py bot play a sound effect ?

    6 décembre 2023, par Kronik71

    My bot is supposed to be some sort of jeopardy quiz show type of bot. /joinvc makes the bot connect to the call, however, I cant seem to make the bot make noise when its in a vc. Here's some of the code :

    


    @interactions.slash_command(
    name="press",
    description="Press the button"
)

async def press(ctx: interactions.ComponentContext):
    await ctx.send(f"{ctx.author.mention} has pressed the button")
    vc = ctx.author.voice.channel
    player = vc.create_ffmpeg_player('audiopath', after=lambda: print('done'))
    player.start()


    


    But whenever I use the /press command, I get this error AttributeError: 'GuildVoice' object has no attribute 'create_ffmpeg_player'

    


    Is it something I did wrong with ffmpeg ?

    


    I tried using a different way to write the code, basically grabbing the ffmpeg.exe path and the audio path, didn't work either. I just want the bot to play a small noise whenever someone uses /press command.

    


  • No audio from discord bot. discord.py/ffmpeg

    22 juillet 2021, par Superior125

    I'm creating a simple music bot and I cant figure out why there is no audio from the bot. I've tried kicking and rejoining, changing code and more. I just cant figure this out. There is no errors from the command line and the bot has a little green circle around it as if there was audio from it. However it goes away if you rejoin the VC.

    


    Here is the code :

    


    import discord
from discord.utils import get
from discord.ext import commands
from discord import FFmpegPCMAudio
from discord.voice_client import VoiceClient

import youtube_dl
import os

TOKEN = "Token Here"
bot = commands.Bot(command_prefix='s')
intents = discord.Intents.default()
intents.members = True
client = commands.Bot(command_prefix=',', intents = intents)

@bot.event
async def on_ready():
    channel = discord.utils.get(bot.get_all_channels(), id=794444804607574026)
    await channel.connect()
    
    
@bot.command(name='play')
async def play(ctx, url):
    await message.content.startswith('play')
    player = await voice_client.create_ytdl_player(url)
    player = await voice.create_ytdl_player("https://youtu.be/K4DyBUG242c")
    player = await vc.create_ytdl_player()
    player.start()

bot.run(TOKEN) 


    


    If you want to, feel free to improve it. I got this code from a YouTube tutorial so I don't completely understand the audio part.

    


  • Discord.py bot joins voice channel but when using voicechannel.play i get error:Command raised an exception : ClientException : Not connected to voice

    25 mai 2023, par AudibleDruid

    So i've managed to get my discord bot to join a voice channel but when i use the play command it gives me an error that its not conencted to voice Command raised an exception: ClientException: Not connected to voice.

    


    Here is my code :

    


    import discord
import random
import glob
from discord.ext import commands

##discord intents 
intents = discord.Intents()
intents.members = True
intents.messages = True
intents.guilds = True
intents.voice_states = True


    


    connect the bot to a voice channel :

    


        
##called when user wants bot to join voice channel
@bot.command(name ='join', help = 'Make the bot join a voice channel')
async def join(context):
    
    botVoice = context.message.guild.voice_client
    if context.guild.voice_client:
        botvoicechannel = context.message.guild.voice_client.channel
    else:
        botvoicechannel = None
    authorVoice = context.author.voice
    if context.author.voice:
        authorvoicechannel = context.author.voice.channel
    else:
        authorvoicechannel = None
    
    ##await context.reply('bot voice channel: {}\n\nbot voice:\n{}\n\nauthor voice channel: {}\n\nauthor voice voice:\n{}\n\n'.format(botvoicechannel, botVoice, authorvoicechannel, authorVoice))
    
    if not authorVoice and not botVoice:
        await context.reply('Connect to a voice channel first.')
        return
    elif authorVoice and not botVoice:
        await context.reply('Connecting to {}'.format(authorvoicechannel))
        await authorvoicechannel.connect()
        return
    elif not authorVoice and botVoice:
        await context.reply("You aren't in a channel, I'm in {}".format(botvoicechannel))
        return
    elif authorVoice and botVoice:
        if (botvoicechannel == authorvoicechannel):
            await context.reply("I'm already in here.")
            return
        else:
            await context.reply('Moving to you!')
            await botVoice.move_to(authorvoicechannel)
            return
        return


    


    and have it play a url :

    


    @bot.command(name ='play', help = 'Make the bot play a url')
async def play(context, url):
    botVoice = context.message.guild.voice_client
    audioSource = discord.FFmpegPCMAudio(url, executable="ffmpeg")
    botVoice.play(audioSource, after = None)


    


    the code works and the bot joins the voice channel. i see it in the voice channel with me, however i get an error when it gets to botVoice.play(audioSource, after = None)

    


    the error message is :
error: Command raised an exception: ClientException: Not connected to voice.

    


    i changed botVoice = context.message.guild.voice_client from botVoice = context.guild.voice_client but that didnt seem to change anything. not sure what to try next. It seems like it wants to play the url the bot just doesnt realize its in the voice channel with me.

    


    maybe a related error. if i kill my python script the bot remains in the channel even though its not running. then when i start it up and do the !join command it says its joining even though its already in the channel with me. its weird because on the join command it checks to see if its already in a voice channel so it should know that its in there with me. idk what to try next. thanks for any suggestions. i only posted relevant code. let me know if you think im missing something else.

    


    thanks for the help