Giter Site home page Giter Site logo

Comments (7)

Ceres445 avatar Ceres445 commented on July 1, 2024

How are you using the command? !test @user?

from discord.py-self.

caiocinel avatar caiocinel commented on July 1, 2024

I also noticed this problem, but I managed to solve it by getting the context information.

*This is far from ideal, but it worked until the next release came out, which should probably fix the problem.

https://github.com/caiocinel/Selfium/blob/main/app/events/client/commands/avatar.py

from discord.py-self.

 avatar commented on July 1, 2024

How are you using the command? !test @user?

Yes

from discord.py-self.

 avatar commented on July 1, 2024

I also noticed this problem, but I managed to solve it by getting the context information.

*This is far from ideal, but it worked until the next release came out, which should probably fix the problem.

https://github.com/caiocinel/Selfium/blob/main/app/events/client/commands/avatar.py

OK, thanks, I'll try this out

from discord.py-self.

 avatar commented on July 1, 2024

I also noticed this problem, but I managed to solve it by getting the context information.

*This is far from ideal, but it worked until the next release came out, which should probably fix the problem.

https://github.com/caiocinel/Selfium/blob/main/app/events/client/commands/avatar.py

Your way still isn't working for me
My command:

@Client.command()
async def test123(ctx):

	async def byMember(member):
		if hasattr(member, 'id'):
			targetId = int(member.id)
		else:
			targetId = member.author.id

		return await byID(targetId)

	async def byID(id):
		target = await Client.fetch_user(int(id))
		return target

	if(ctx.message.mentions):
		target = ctx.message.mentions
	else:
		target = ctx.args

	try:
		for t in range(len(target)):
			memberFetch = await byMember(target[t])
			embed = discord.Embed(colour=discord.Colour.green())
			embed.set_author(name=f"🖼️ Here's {memberFetch.display_name} profile picture", url=f"{memberFetch.avatar_url.BASE + memberFetch.avatar_url._url}")
			embed.set_image(url=memberFetch.avatar_url.BASE + memberFetch.avatar_url._url)
			await ctx.send(embed=embed)
	except:
		print('not found')

Hope it's not a stupid mistake on my part

from discord.py-self.

caiocinel avatar caiocinel commented on July 1, 2024

Your code worked perfectly in my tests (although it might be better structured), set some breakpoints and see what happens.

image

from discord.py-self.

 avatar commented on July 1, 2024

Your code worked perfectly in my tests (although it might be better structured), set some breakpoints and see what happens.

image

Using the development version fixed it for me. Works using your method and the normal method. Thanks for the help

from discord.py-self.

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.