Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Basics Version Change!!! #40

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions disputils/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def quit(self, text: str = None):
except errors.Forbidden:
pass

async def update(self, text: str, color: hex = None, hide_author: bool = False):
async def update(self, text: str, color: hex = None, hide_author: bool = False, delete_after: int = None):
"""
This will update the dialog embed.

Expand All @@ -68,9 +68,9 @@ async def update(self, text: str, color: hex = None, hide_author: bool = False):
if hide_author:
self._embed.set_author(name="")

await self.display(embed=self._embed)
await self.display(embed=self._embed, delete_after=delete_after)

async def display(self, text: str = None, embed: Embed = None):
async def display(self, text: str = None, embed: Embed = None, delete_after: int = None):
"""
This will edit the dialog message.

Expand All @@ -79,4 +79,4 @@ async def display(self, text: str = None, embed: Embed = None):
:rtype: ``None``
"""

await self.message.edit(content=text, embed=embed)
await self.message.edit(content=text, embed=embed, delete_after=delete_after)
2 changes: 1 addition & 1 deletion disputils/confirmation.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async def confirm(

emb = discord.Embed(title=text, color=self.color)
if not hide_author:
emb.set_author(name=str(user), icon_url=user.avatar_url)
emb.set_author(name=str(user), icon_url=user.avatar.url)

self._embed = emb

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="disputils",
version="0.2.0",
version="0.2.1",
description="Some utilities for discord.py. Making Discord bot development easier.",
long_description=readme,
long_description_content_type="text/x-rst",
Expand All @@ -18,7 +18,7 @@
"Programming Language :: Python :: 3.6",
],
python_requires=">=3.6",
install_requires=["discord.py >=1,<2"],
install_requires=["py-cord @ git+https://github.com/Pycord-Development/pycord@master"],
keywords="discord discord-py discord-bot utils utility",
packages=find_packages(exclude=["examples", "docs", "tests"]),
data_files=None,
Expand Down