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

Sourcery refactored dev branch #127

Merged
merged 2 commits into from Aug 11, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions assistant/__init__.py
Expand Up @@ -24,5 +24,4 @@ async def setit(event, name, value):


def get_back_button(name):
button = [Button.inline("« Bᴀᴄᴋ", data=f"{name}")]
return button
return [Button.inline("« Bᴀᴄᴋ", data=f"{name}")]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function get_back_button refactored with the following changes:

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function get_back_button refactored with the following changes:

33 changes: 15 additions & 18 deletions assistant/api_setter.py
Expand Up @@ -41,12 +41,11 @@ async def rmbgapi(event):
"Cancelled!!",
buttons=get_back_button("apiset"),
)
else:
await setit(event, var, themssg)
await conv.send_message(
f"{name} changed to {themssg}",
buttons=get_back_button("apiset"),
)
await setit(event, var, themssg)
await conv.send_message(
f"{name} changed to {themssg}",
buttons=get_back_button("apiset"),
)
Comment on lines -44 to +48
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function rmbgapi refactored with the following changes:

Comment on lines -44 to +48
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function rmbgapi refactored with the following changes:



@callback("dapi")
Expand All @@ -66,12 +65,11 @@ async def rmbgapi(event):
"Cancelled!!",
buttons=get_back_button("apiset"),
)
else:
await setit(event, var, themssg)
await conv.send_message(
f"{name} changed to {themssg}",
buttons=get_back_button("apiset"),
)
await setit(event, var, themssg)
await conv.send_message(
f"{name} changed to {themssg}",
buttons=get_back_button("apiset"),
)
Comment on lines -69 to +72
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function rmbgapi refactored with the following changes:

Comment on lines -69 to +72
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function rmbgapi refactored with the following changes:



@callback("oapi")
Expand All @@ -91,9 +89,8 @@ async def rmbgapi(event):
"Cancelled!!",
buttons=get_back_button("apiset"),
)
else:
await setit(event, var, themssg)
await conv.send_message(
f"{name} changed to {themssg}",
buttons=get_back_button("apiset"),
)
await setit(event, var, themssg)
await conv.send_message(
f"{name} changed to {themssg}",
buttons=get_back_button("apiset"),
)
Comment on lines -94 to +96
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function rmbgapi refactored with the following changes:

Comment on lines -94 to +96
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function rmbgapi refactored with the following changes: