Coder Social home page Coder Social logo

Comments (4)

Scyye avatar Scyye commented on May 24, 2024

I feel like all arguments that accept "member" should be changed to user

is there any place this wouldnt be acceptable?

from modmail.

SnowyJaguar1034 avatar SnowyJaguar1034 commented on May 24, 2024

I feel like all arguments that accept "member" should be changed to user

is there any place this wouldnt be acceptable?

I think checking user has more API requests to discord than member does (I could be wrong), so it's better to use member where possible. Also there's not many commands that could really benefit from the user arg other than whitelist and blacklist, which I updated in the pr.

from modmail.

Scyye avatar Scyye commented on May 24, 2024

The fetch_user method in discord.py and the fetch_member method for fetching a member in a guild comparison of API requests

  1. fetch_user

    • Purpose: Fetches a user globally, not limited to a specific guild.
    • API Requests: Generally uses fewer API requests as it's a global search for a user.
      1 2 3
  2. guild.fetch_member

    • Purpose: Fetches a member in a specific guild.
    • API Requests: May use more API requests, especially in large guilds, as it's specific to a particular guild.
      4 5 6

from modmail.

chamburr avatar chamburr commented on May 24, 2024

If you search for the remaining cases where member is still used, you'll realise why they cannot be changed to user.

This issue is fixed in fec862a.

from modmail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.