久久久久久久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>
                          主站蜘蛛池模板: 一区二区三区四区国产 | 亚洲精品一区二区在线观看 | 亚洲精品一区二区三区蜜桃久 | 国产精品精品久久久 | 午夜无码国产理论在线 | 在线观看www | 国产精品久久久久久亚洲调教 | 国产成人精品久久二区二区 | 在线免费国产视频 | 在线观看www| 久久久久国产一区二区三区 | 国产精品观看 | 色www精品视频在线观看 | 日本免费视频在线观看 | 日韩中文一区二区三区 | 久久国产日本 | 天天av综合 | 中文字幕在线观看一区 | 韩国毛片一区二区三区 | 视频一区在线观看 | 99亚洲精品| 欧美日一区二区 | 不卡在线视频 | 精品一区二区三区在线观看国产 | 国产羞羞视频在线观看 | 亚洲高清视频在线观看 | 成年网站在线观看 | 欧产日产国产精品99 | 久久亚洲国产精品 | 亚洲国产精品91 | 亚洲精品一区二区在线 | 最近日韩中文字幕 | 亚洲一区二区综合 | 国产精品久久久久久福利一牛影视 | 国产福利91精品 | 国产高清免费视频 | 久久久久久久久精 | 国产美女特级嫩嫩嫩bbb片 | 亚洲精品www | 日本久久久久久 | 337p日韩 |