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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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}")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
Comment on lines
-44
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
||
|
||
|
||
@callback("dapi") | ||
|
@@ -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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
Comment on lines
-69
to
+72
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
||
|
||
|
||
@callback("oapi") | ||
|
@@ -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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
Comment on lines
-94
to
+96
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
There was a problem hiding this comment.
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:inline-immediately-returned-variable
)