Recherche avancée

Médias (0)

Mot : - Tags -/api

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (51)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

Sur d’autres sites (4359)

  • How do I make my discord.py bot play mp3 in voice channel ?

    17 décembre 2020, par ropke

    I'm a beginner in Python and I have recently started making a discord bot for some friends and I. The idea is to type !startq and have the bot join the channel, play an mp3 file that is locally stored in the same folder that the bot.py is in also.

    



    import discord, chalk
from discord.ext import commands
import time
import asyncio

bot = commands.Bot(command_prefix = "!")

@bot.event
async def on_ready():
    print("Bot is ready!")

@bot.command()
async def q5(ctx):
    await ctx.send("@here QUEUE STARTING IN 5 MINUTES")

@bot.command()
async def q3(ctx):
    await ctx.send("@here QUEUE STARTING IN 3 MINUTES")

@bot.command()
async def q1(ctx):
    await ctx.send("@here QUEUE STARTING IN 1 MINUTES")

@bot.command()
async def ping(ctx):
    ping_ = bot.latency
    ping =  round(ping_ * 1000)
    await ctx.send(f"my ping is {ping}ms")

@bot.command()
async def startq(ctx):
    voicechannel = discord.utils.get(ctx.guild.channels, name='queue')
    vc = await voicechannel.connect()
    vc.play(discord.FFmpegPCMAudio("countdown.mp3"), after=lambda e: print('done', e))
    bot.run('TOKEN')


    



    So far my bot joins the channel fine, but it doesn't actually play the mp3. I've asked countless people in the "Unofficial Discord API Discord" and a few other programming Discords, but I haven't gotten an answer yet.

    


  • how to locate the voice chat that the discord bot is connected to

    10 mars 2019, par SwaggZ ReYan

    I am making a discord bot that is being activated by voice recognition, im at the very beginning right now im making him join a voice channel (which is working), and im trying to make a command to make him leave.

    const commando = require('discord.js-commando');

    class LeaveChannelCommand extends commando.Command
    {
       constructor(client){!
           super(client,{
               name: 'leave',
               group: 'music',
               memberName: 'leave',
               description: 'leaves a voice channel'
           });
       }
       async run(message, args)
       {
           if(message.guild.voiceConnection)
           {
               message.guild.voiceConnection.disconnect();
           }
           else
           {
               message.channel.sendMessage("seccessfully left")
           }
       }
    }

    module.exports = LeaveChannelCommand;

    right now you can type !leave from anywhere in the server and the bot leaves,
    i want to make it possible to control him only from the same voice channel,
    what should i do

  • How do I make my Discord Bot play mp3 files, while in a voice Channel ? (FFMPEG problem)

    27 mars 2019, par João Pimenta

    I’m trying to make a bot that joins the voice channel, plays a mp3 file from my computer, and leaves the channel afterwards.

    It "does" work, joins, leaves, but it doesn’t plays any sound, sometimes it produces static-like noises though, which made me think it is a FFMPEG problem.

    I’m on a ubuntu 16.04.

    I have tried changing the way I show the function what the path is for my .mp3 file. I came to the conclusion that ('/home/user/djsBot/01.mp3'); is the correct way to do it (the documentation asks for an absolute path), because I thought it wasn’t able to locate my file.

    I have also tried uninstalling and installing ffmpeg-binaries, same for node-opus, both of which give me moderate vulnerability reports (not sure what this means) and tell to run npm audit fix.

    I’m somewhat new to ubuntu, and a complete beginner on JS and Node.JS, so any tips or clarification are welcome. :)

    client.on('message', (msg) => {
     if (msg.content === '1') { // user types '1' to play a sound
       if (msg.member.voiceChannel) {
         msg.member.voiceChannel.join() // bot joins user's channel
         .then(connection => {
             const dispatcher = connection.playFile('/home/user/djsBot/01.mp3');
             dispatcher.on("end", end => {
               msg.member.voiceChannel.leave();
             });
         }).catch(err => {
             console.log(err);
           });
       }
       else {
         msg.channel.send(`You must be in a Voice Channel for me to talk to you, ${msg.author.username}!`);
       }
     }
    });