# about Specifications
Why is there a mix of specifications up to 1.7 and use of 2.0?
Example:
- 1.7's avatar_url
- 2.0's datetime type (aware/native)
# about Issues
We can't make an issue unless we use a special method.
Can not:
1, Go to Issues tab
2, Click "New issue" button
Can:
Access the link to create an new issue.
(https://github.com/iDevision/enhanced-discord.py/issues/new)
Why is there a mix of specifications up to 1.7 and use of 2.0?
They are branches. 2.0 is the only maintained branch.
We can't make an issue unless we use a special method.
That's a github/browser bug. I am able to create issues just fine.
> Why is there a mix of specifications up to 1.7 and use of 2.0?
They are branches. 2.0 is the only maintained branch.
> We can't make an issue unless we use a special method.
That's a github/browser bug. I am able to create issues just fine.
They are branches. 2.0 is the only maintained branch.
The 1.7 and 2.0 mentioned here are from Discord.py. My apologies.
What I want to ask is why there is a mix of User.avatar_url, which is the spec up to 1.7 of discord.py, and datatime type aware, which is the spec from 2.0 of discord.py.
If this is the case, people who want to migrate from discord.py may have to rewrite the code.
What do you think about this?
That's a github/browser bug. I am able to create issues just fine.
I think it's not github's bug.
I think you can recreate it this way:
open issue tab. (this repository)
Click "New issue" button.
You will see two options, "Ask a question" and "Discord Server".
Selecting "Ask a question" will take you to the Discussions tab of the original Discord.py.
Selecting "Discord Server" will take you to the original Discord.py's official server invite link.
(I'm not a native speaker, so I use the DeepL translator. Sorry.)
> They are branches. 2.0 is the only maintained branch.
The 1.7 and 2.0 mentioned here are from Discord.py. My apologies.
What I want to ask is why there is a mix of User.avatar_url, which is the spec up to 1.7 of discord.py, and datatime type aware, which is the spec from 2.0 of discord.py.
If this is the case, people who want to migrate from discord.py may have to rewrite the code.
What do you think about this?
> That's a github/browser bug. I am able to create issues just fine.
I think it's not github's bug.
I think you can recreate it this way:
1. open issue tab. (this repository)
2. Click "New issue" button.
3. You will see two options, "Ask a question" and "Discord Server".
Selecting "Ask a question" will take you to the Discussions tab of the original Discord.py.
Selecting "Discord Server" will take you to the original Discord.py's official server invite link.
I don't know if this is correct because I don't know much about Github, but I think it has something to do with the files in this folder(https://github.com/iDevision/enhanced-discord.py/tree/master/.github/ISSUE_TEMPLATE).
(I'm not a native speaker, so I use the DeepL translator. Sorry.)
The 1.7 and 2.0 mentioned here are from Discord.py. My apologies.
What I want to ask is why there is a mix of User.avatar_url, which is the spec up to 1.7 of discord.py, and datatime type aware, which is the spec from 2.0 of discord.py.
If this is the case, people who want to migrate from discord.py may have to rewrite the code.
What do you think about this?
Where exactly do you see the mix ? In the online docs ? Because the 2.0 branch is a direct upgrade from dpy2.0a with a few added features.
I think it's not github's bug.
Oh yeah, I saw what you meant, I'll fix it
> The 1.7 and 2.0 mentioned here are from Discord.py. My apologies.
>
> What I want to ask is why there is a mix of User.avatar_url, which is the spec up to 1.7 of discord.py, and datatime type aware, which is the spec from 2.0 of discord.py.
> If this is the case, people who want to migrate from discord.py may have to rewrite the code.
What do you think about this?
Where exactly do you see the mix ? In the online docs ? Because the 2.0 branch is a direct upgrade from dpy2.0a with a few added features.
> I think it's not github's bug.
Oh yeah, I saw what you meant, I'll fix it
I'm sorry, I forgot to tell you. It's in the program.
You will be able to reproduce this way:
importdiscord# enhanced-discord.pyimportdatetimeimporttracebackclient=discord.Client()@client.eventasyncdefon_ready():message=awaitclient.get_channel(<channel_id>).fetch_message(<message_id>)try:message.created_at<datetime.datetime.utcnow()exceptExceptionase:""" If the datetime offset is different, an error will be print """# Error: TypeError: can't compare offset-naive and offset-aware datetimestraceback.print_exc(e)message.author.avatar_urlmessage.author.avatar.url# Errorclient.run(<TOKEN>)
In 2.0, the datetime offset returned by created_at, etc. is now aware. However, the offset returned by datetime.utcnow is naive. These comparisons will raise a TypeError.
In 1.7, if you want to get the avatar url of a user, use User.avatar_url. However, in 2.0, User.avatar.url is used.
Is there a reason for these?
> Oh yeah, I saw what you meant, I'll fix it
Thank you.
> Where exactly do you see the mix ?
I'm sorry, I forgot to tell you. It's in the program.
You will be able to reproduce this way:
```py
import discord # enhanced-discord.py
import datetime
import traceback
client = discord.Client()
@client.event
async def on_ready():
message = await client.get_channel(<channel_id>).fetch_message(<message_id>)
try:
message.created_at < datetime.datetime.utcnow()
except Exception as e:
""" If the datetime offset is different, an error will be print """
# Error: TypeError: can't compare offset-naive and offset-aware datetimes
traceback.print_exc(e)
message.author.avatar_url
message.author.avatar.url # Error
client.run(<TOKEN>)
```
In 2.0, the datetime offset returned by `created_at`, etc. is now `aware`. However, the offset returned by `datetime.utcnow` is `naive`. These comparisons will raise a TypeError.
In 1.7, if you want to get the avatar url of a user, use `User.avatar_url`. However, in 2.0, `User.avatar.url` is used.
Is there a reason for these?
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
about Specifications
Why is there a mix of specifications up to 1.7 and use of 2.0?
Example:
about Issues
We can't make an issue unless we use a special method.
Can not:
1, Go to Issues tab
2, Click "New issue" button
Can:
Access the link to create an new issue.
(https://github.com/iDevision/enhanced-discord.py/issues/new)
They are branches. 2.0 is the only maintained branch.
That's a github/browser bug. I am able to create issues just fine.
The 1.7 and 2.0 mentioned here are from Discord.py. My apologies.
What I want to ask is why there is a mix of User.avatar_url, which is the spec up to 1.7 of discord.py, and datatime type aware, which is the spec from 2.0 of discord.py.
If this is the case, people who want to migrate from discord.py may have to rewrite the code.
What do you think about this?
I think it's not github's bug.
I think you can recreate it this way:
Selecting "Ask a question" will take you to the Discussions tab of the original Discord.py.
Selecting "Discord Server" will take you to the original Discord.py's official server invite link.
I don't know if this is correct because I don't know much about Github, but I think it has something to do with the files in this folder(https://github.com/iDevision/enhanced-discord.py/tree/master/.github/ISSUE_TEMPLATE).
(I'm not a native speaker, so I use the DeepL translator. Sorry.)
Where exactly do you see the mix ? In the online docs ? Because the 2.0 branch is a direct upgrade from dpy2.0a with a few added features.
Oh yeah, I saw what you meant, I'll fix it
Thank you.
I'm sorry, I forgot to tell you. It's in the program.
You will be able to reproduce this way:
In 2.0, the datetime offset returned by
created_at, etc. is nowaware. However, the offset returned bydatetime.utcnowisnaive. These comparisons will raise a TypeError.In 1.7, if you want to get the avatar url of a user, use
User.avatar_url. However, in 2.0,User.avatar.urlis used.Is there a reason for these?