久久久久久久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.日韩系列 | 亚洲精品久久视频 | 亚洲日本一区二区 | 三级视频久久 | 天天射美女 | 91日日| 国产美女h视频 | 国产成人午夜精品影院游乐网 | 91精品国产一区二区三区 | 亚洲精品乱码久久久久久按摩观 | 四虎av电影 | 日韩久久精品电影 | 一区在线视频 | 亚洲日韩欧美一区二区在线 | 国产成人亚洲精品 | 欧美性生活一区二区三区 | 日日日日日日bbbbb视频 | 蜜桃日韩 | 999观看免费高清www | 岛国av免费看 | 久久久久久免费看 | 国产精品高潮呻吟 | 一区视频在线 | 久久99精品久久久久蜜桃tv | 国产乱码精品一区二区三区五月婷 | 欧美日韩网站 | 免费观看一级特黄欧美大片 | 久久丝袜视频 | 亚洲精品视频免费观看 | 亚洲国产一区二区视频 | 一级黄色影片在线观看 | 国产精品欧美一区喷水 | 2018国产大陆天天弄 | 日韩一区二区三区在线 | 欧美日韩视频在线 | 九九综合 | 午夜视频免费在线观看 |