Open Dark-night45 opened 2 years ago
which operating system are you using for your bot?
Windows 10 x64
can you try again with current dev-master?
I use normal master but now i updated it(v7.3.3) but my music file not played also i tested dev-master, but with dev-master i can't run the bot and this is the error message i got :
PHP Fatal error: Uncaught Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException: The option "pmChannels" does not exist. Defined options are: "cacheInterface", "cacheSweep", "disabledEvents", "dnsConfig", "intents", "loadAllMembers", "logger", "loop", "retrieveBans", "shardCount", "shardId", "socket_options", "storeMessages", "token". in C:\xampp\htdocs\back now\bot\vendor\symfony\options-resolver\OptionsResolver.php:871
Stack trace:
#0 C:\xampp\htdocs\back now\bot\vendor\team-reflex\discord-php\src\Discord\Discord.php(1422): Symfony\Component\OptionsResolver\OptionsResolver->resolve()
#1 C:\xampp\htdocs\back now\bot\vendor\team-reflex\discord-php\src\Discord\Discord.php(362): Discord\Discord->resolveOptions()
#2 C:\xampp\htdocs\back now\bot\index.php(44): Discord\Discord->__construct()
#3 {main}
thrown in C:\xampp\htdocs\back now\bot\vendor\symfony\options-resolver\OptionsResolver.php on line 871
but with dev-master i can't run the bot and this is the error message i got :
Remove 'pmChannels' from your Discord options, it is no longer available in v10
$discord = new Discord([
'pmChannels' => ... // remove this
]);
My bot run successfully But no command worked and no error was displayed in the console
is your bot verified? is the command a message one without mention or through slash? do you have message_content intent enabled?
My bot not verified, i don't have any slash command and message_content is enabled
is it also enabled in the intents defined in the options for $discord = new Discord()? (See #905)
i see the following issue, but if my bot return empty, then why functions like join voice not working
I don't have any such issues as you described above, also, in regards to joining a voice channel, nothing really changed, so this should simply work, even on your 7.3.3, show me your discord construct (without the token)
include __DIR__ . '/vendor/autoload.php';
require_once('secret.php');
$GLOBALS['prefix'] = '.';
$token = get_token();
$discord = new Discord([
'token' => $token,
'loadAllMembers' => false,
'storeMessages' => false,
// 'pmChannels' => false
// 'dnsConfig' => '8.8.8.8'
]);
$discord->on('ready', function(Discord $discord){
echo "Bot is online";
});
$discord->on('ready', function($discord) {
$activity = $discord->factory(Activity::class, [
'name' => 'KC',
'type' => Activity::TYPE_COMPETING
]);
$discord->updatePresence($activity, false, "idle", false);
});
$discord->on('error', function ($e) {
echo emit('udp-error', [$e]);
});
$discord->run();
My bot run successfully But no command worked and no error was displayed in the console
@Dark-night45 Hello, I know it's late but I updated my Hiro-Bot and commands were not worked for me too. I fixed with adding intent, 'Intents::MESSAGE_CONTENT'.
Example from my bot:
$bot = new Hiro([
'token' => $_ENV['TOKEN'],
'prefix' => $_ENV['PREFIX'],
'shardId' => $shard_id,
'shardCount' => $shard_count,
'caseInsensitiveCommands' => true,
'loadAllMembers' => true,
'intents' => Intents::getDefaultIntents() | Intents::GUILD_MEMBERS | Intents::MESSAGE_CONTENT
]);
I'm seeing you're not using intents so you can fix that with adding this to array:
'intents' => Intents::getDefaultIntents() | Intents::GUILD_MEMBERS | Intents::MESSAGE_CONTENT
If you don't wanna to use GUILD_MEMBERS intent,
'intents' => Intents::getDefaultIntents() | Intents::MESSAGE_CONTENT
this is works too.
Had the same issue. Promise seemed stuck in an unresolved state after UDP connection was established (event listeners for the voice status change never fired). Updating the library to current dev-master resolved the issue.
Seems like those events are no longer emitted on version pre 10.0-RC.
Environment
Description I have problem with play music from file in voice when i run command, bot joined to voice but no sound. in console i don't get any error. also i use debug code but no error. i have all requirements too but file not played in voice.
Code :
Edit : Update discordphp version