久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <small id='8UrwI'></small><noframes id='8UrwI'>

    <i id='8UrwI'><tr id='8UrwI'><dt id='8UrwI'><q id='8UrwI'><span id='8UrwI'><b id='8UrwI'><form id='8UrwI'><ins id='8UrwI'></ins><ul id='8UrwI'></ul><sub id='8UrwI'></sub></form><legend id='8UrwI'></legend><bdo id='8UrwI'><pre id='8UrwI'><center id='8UrwI'></center></pre></bdo></b><th id='8UrwI'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='8UrwI'><tfoot id='8UrwI'></tfoot><dl id='8UrwI'><fieldset id='8UrwI'></fieldset></dl></div>
    • <bdo id='8UrwI'></bdo><ul id='8UrwI'></ul>
    1. <legend id='8UrwI'><style id='8UrwI'><dir id='8UrwI'><q id='8UrwI'></q></dir></style></legend>

      <tfoot id='8UrwI'></tfoot>

      如何使用 discord.py 獲取語音頻道的所有成員

      How to get all members of a voice-channel with discord.py(如何使用 discord.py 獲取語音頻道的所有成員)
      <i id='FCiIL'><tr id='FCiIL'><dt id='FCiIL'><q id='FCiIL'><span id='FCiIL'><b id='FCiIL'><form id='FCiIL'><ins id='FCiIL'></ins><ul id='FCiIL'></ul><sub id='FCiIL'></sub></form><legend id='FCiIL'></legend><bdo id='FCiIL'><pre id='FCiIL'><center id='FCiIL'></center></pre></bdo></b><th id='FCiIL'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='FCiIL'><tfoot id='FCiIL'></tfoot><dl id='FCiIL'><fieldset id='FCiIL'></fieldset></dl></div>

          <tbody id='FCiIL'></tbody>
          <bdo id='FCiIL'></bdo><ul id='FCiIL'></ul>
        • <tfoot id='FCiIL'></tfoot><legend id='FCiIL'><style id='FCiIL'><dir id='FCiIL'><q id='FCiIL'></q></dir></style></legend>
        • <small id='FCiIL'></small><noframes id='FCiIL'>

              • 本文介紹了如何使用 discord.py 獲取語音頻道的所有成員的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我有問題,如果我將所有成員作為特定語音頻道的 Meber 的對象.我只得到一個空列表.

                I have the problem, if I will get all members as an object of Meber of a specific Voice-channel. I only get a empty list back.

                這是我的代碼:

                @bot.command(name='random')
                async def nine_nine(ctx, amount_of_groups: int):
                    this_guild = ctx.guild
                    sender = ctx.message.author
                    #Es wird geschaut, in welchem Channel sich der Schreiber befindet
                    try:
                        voice_channel = ctx.message.author.voice.channel
                        print(voice_channel)
                    except AttributeError:
                        await ctx.send("Du bist in keinem Voice-Channel")
                        return
                    #Alle anderen Mitglieder aus dem Kanal werden ermittelt und in eine Liste geschrieben
                    this_category = voice_channel.category
                
                    member_list = voice_channel.members # <-- This only returns an empty List
                
                    print(member_list)
                    print(this_category)
                    #Die Mitglieder werden gemischt
                    random.shuffle(member_list)
                    #Die Mitglieder werden in gleichgro?e Gruppen aufgeteilt
                    avg = len(member_list) / float(amount_of_groups)
                    out = []
                    last = 0.0
                
                    while last < len(member_list):
                        out.append(member_list[int(last):int(last + avg)])
                        last += avg
                    print(out)
                    for group in range(0, amount_of_groups):
                        new_channel = await this_guild.create_voice_channel(name=f'Gruppe{group+1}', category=this_category)
                        for member in range(len(out[group])):
                            try:
                                await out[group][member].move_to(new_channel)
                            except:
                                print("F")
                            print(out[group][member])
                
                

                我該如何解決這個問題?

                How can I fix this Problem?

                推薦答案

                你必須像這樣在 bot = ... 之前啟用 Intents.members:

                You have to enable Intents.members like this before bot = ... :

                intents = discord.Intents.default()
                intents.members = True
                

                并更新 bot = .. 以包含參數 intents=intents.

                and update the bot = .. to include the argument intents=intents.

                您還必須在您的應用程序站點中啟用不和諧的成員意圖(

                Also you have to enable member intents in your application site in discord (go here, click on your bot, click on bot at the sidebar and enable them.):

                參考資料:

                discord.Intents.members

                這篇關于如何使用 discord.py 獲取語音頻道的所有成員的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                Discord bot isn#39;t responding to commands(Discord 機器人沒有響應命令)
                Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關于我嗎?Discord 機器人的功能?(不和諧.py))
                message.channel.id Discord PY(message.channel.id Discord PY)
                How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機器人?)
                discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)
                • <bdo id='zVNmg'></bdo><ul id='zVNmg'></ul>
                  <legend id='zVNmg'><style id='zVNmg'><dir id='zVNmg'><q id='zVNmg'></q></dir></style></legend>

                  <small id='zVNmg'></small><noframes id='zVNmg'>

                  1. <i id='zVNmg'><tr id='zVNmg'><dt id='zVNmg'><q id='zVNmg'><span id='zVNmg'><b id='zVNmg'><form id='zVNmg'><ins id='zVNmg'></ins><ul id='zVNmg'></ul><sub id='zVNmg'></sub></form><legend id='zVNmg'></legend><bdo id='zVNmg'><pre id='zVNmg'><center id='zVNmg'></center></pre></bdo></b><th id='zVNmg'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='zVNmg'><tfoot id='zVNmg'></tfoot><dl id='zVNmg'><fieldset id='zVNmg'></fieldset></dl></div>

                          <tbody id='zVNmg'></tbody>
                          <tfoot id='zVNmg'></tfoot>
                          主站蜘蛛池模板: 亚洲一区二区三区 | 99久久婷婷国产综合精品电影 | 在线观看日韩精品视频 | 亚洲一区 | 九九视频在线观看 | 日本天堂一区 | www.久| 99热精品在线 | 久久国产一区二区 | 精品乱码一区二区三四区视频 | 国产精品欧美精品 | 色性av | 中文字幕三区 | av电影手机版| 免费看欧美一级片 | 欧美一区二区三区在线免费观看 | 日韩成人免费视频 | 日产精品久久久一区二区福利 | 99精品久久久久久 | 水蜜桃久久夜色精品一区 | 日韩在线国产精品 | 国产一区二区三区色淫影院 | 国产区在线 | 国家一级黄色片 | 国产欧美一区二区三区日本久久久 | 粉嫩粉嫩芽的虎白女18在线视频 | 免费一区二区三区 | av电影一区二区 | 精品综合视频 | www.久草.com | 午夜久久久 | 亚洲精品免费视频 | 久久噜噜噜精品国产亚洲综合 | 日韩成人在线免费观看 | 欧美不卡一区二区 | 久久激情网 | 精品国产乱码久久久久久1区2区 | 久久日韩精品 | 成人免费看黄 | 97精品国产97久久久久久免费 | 久久这里只有精品首页 |