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

        <bdo id='Rhs43'></bdo><ul id='Rhs43'></ul>
      <legend id='Rhs43'><style id='Rhs43'><dir id='Rhs43'><q id='Rhs43'></q></dir></style></legend>

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

      2. <small id='Rhs43'></small><noframes id='Rhs43'>

      3. Discord.py 顯示誰邀請了用戶

        Discord.py show who invited a user(Discord.py 顯示誰邀請了用戶)
            <tbody id='xfYES'></tbody>

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

                • <tfoot id='xfYES'></tfoot>

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

                  本文介紹了Discord.py 顯示誰邀請了用戶的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我目前正在嘗試找出一種方法來了解誰邀請了用戶.從官方文檔中,我認為 member 類將具有顯示誰邀請他們的屬性,但事實并非如此.我對獲取邀請的用戶的可能方法有一個非常模糊的想法,那就是獲取服務器中的所有邀請,然后獲取使用次數,當有人加入服務器時,它會檢查是否有增加的邀請一種用途.但我不知道這是否是最有效的方法,或者至少是使用過的方法.

                  I am currently trying to figure out a way to know who invited a user. From the official docs, I would think that the member class would have an attribute showing who invited them, but it doesn't. I have a very faint idea of a possible method to get the user who invited and that would be to get all invites in the server then get the number of uses, when someone joins the server, it checks to see the invite that has gone up a use. But I don't know if this is the most efficient method or at least the used method.

                  推薦答案

                  制作一個 config.json 文件,內容為

                  Make a config.json file with the content of

                  {
                      "token": "Bot token here",
                      "server-id": "server id here",
                      "logs-channel-id": "invite channel here"
                  }
                  

                  然后保存.

                  創建一個名為 invites 的頻道,然后填寫 config.json 文件.然后創建一個名為 bot.py 的文件并將內容放入:

                  Make a channel called invites then fill in the config.json file. And then create a file called bot.py and put the contents of:

                  import asyncio
                  import datetime
                  import json
                  import os
                  import commands
                  
                  client = discord.Client()
                  cfg = open("config.json", "r")
                  tmpconfig = cfg.read()
                  cfg.close()
                  config = json.loads(tmpconfig)
                  
                  token = config["token"]
                  guild_id = config["server-id"]
                  logs_channel = config["logs-channel-id"]
                  
                  
                  invites = {}
                  last = ""
                  
                  async def fetch():
                   global last
                   global invites
                   await client.wait_until_ready()
                   gld = client.get_guild(int(guild_id))
                   logs = client.get_channel(int(logs_channel))
                   while True:
                    invs = await gld.invites()
                    tmp = []
                    for i in invs:
                     for s in invites:
                      if s[0] == i.code:
                       if int(i.uses) > s[1]:
                        usr = gld.get_member(int(last))
                        testh = f"{usr.name} **joined**; Invited by **{i.inviter.name}** (**{str(i.uses)}** invites)"
                        await logs.send(testh)
                     tmp.append(tuple((i.code, i.uses)))
                    invites = tmp
                    await asyncio.sleep(4)
                  
                  
                  @client.event
                  async def on_ready():
                   print("ready!")
                   await client.change_presence(activity = discord.Activity(name = "joins", type = 2))
                  
                  
                  @client.event
                  async def on_member_join(meme):
                   global last
                   last = str(meme.id)
                  
                  
                  
                  
                  client.loop.create_task(fetch())
                  client.run(token)
                  

                  然后打開終端運行python3 bot.py.如需更多幫助,請加入 this.

                  Then open the terminal and run python3 bot.py. And for more help join this.

                  這篇關于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 - 自動更改角色顏色)
                • <legend id='ZivP4'><style id='ZivP4'><dir id='ZivP4'><q id='ZivP4'></q></dir></style></legend>
                  • <bdo id='ZivP4'></bdo><ul id='ZivP4'></ul>

                          <tbody id='ZivP4'></tbody>

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

                        <i id='ZivP4'><tr id='ZivP4'><dt id='ZivP4'><q id='ZivP4'><span id='ZivP4'><b id='ZivP4'><form id='ZivP4'><ins id='ZivP4'></ins><ul id='ZivP4'></ul><sub id='ZivP4'></sub></form><legend id='ZivP4'></legend><bdo id='ZivP4'><pre id='ZivP4'><center id='ZivP4'></center></pre></bdo></b><th id='ZivP4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ZivP4'><tfoot id='ZivP4'></tfoot><dl id='ZivP4'><fieldset id='ZivP4'></fieldset></dl></div>
                            <tfoot id='ZivP4'></tfoot>
                            主站蜘蛛池模板: 国产精品揄拍一区二区 | 一级毛片播放 | 天久久 | 欧美天堂| 欧美在线视频免费 | 国产精品一二区 | 国产在线一区二区 | 精品免费国产一区二区三区四区介绍 | 日韩成年人视频在线 | 国产日韩欧美一区二区 | 国产成人精品视频在线观看 | 狠狠插狠狠操 | www.一区二区 | 欧美日韩在线免费观看 | 自拍视频一区二区三区 | 亚洲精品视频导航 | 亚洲精品99| 超碰欧美 | www.国产精| 国产偷自视频区视频 | 欧美在线a| 国产一区在线免费观看视频 | 精品1区 | 欧美日韩1区2区 | 国产精品毛片久久久久久久 | 亚洲日韩中文字幕一区 | 美女久久视频 | 动漫www.被爆羞羞av44 | 成人久久18免费网站图片 | 国产清纯白嫩初高生视频在线观看 | 亚洲精品www久久久 www.蜜桃av | 久久r精品 | 精品国产乱码久久久久久丨区2区 | 久久亚洲国产精品日日av夜夜 | 国产精品久久7777777 | 中文在线视频观看 | av中文在线| 成人精品鲁一区一区二区 | 亚洲激情在线视频 | 久久免费看| 日韩黄 |