-
Notifications
You must be signed in to change notification settings - Fork 0
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
Ggsbot UI elements #58
base: main
Are you sure you want to change the base?
Conversation
|
Nella classe UiPage sostituire il parametro da Così da garantire che anche se si fa l'override del metodo self.on_next comunque si mantiene il comportamento del decorator |
message = await interaction.followup.send(embed=ui,view=ui, wait=True) | ||
assert not await ui.wait(), f'The configuration process has expired' | ||
message = await interaction.followup.send(embed=ui.current_page,view=ui.current_page, wait=True) | ||
assert not await ui.submit_page.wait(), f'The configuration process has expired' |
Check notice
Code scanning / Bandit
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note
# NOTE: Quando ottengo i nuovi giveaway non devo sostituirli con quelli precedenti ma aggiungere quelli nuovi alla lista | ||
|
||
content_type, content, code, reason = await asyncget(f"{self.gp_baseurl}/api/giveaways") | ||
assert content_type == 'application/json' and code == 200, f'Error while fetching new giveaways (code: {code}): {reason}' |
Check notice
Code scanning / Bandit
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note
assert not await ui.wait(), f'The configuration process has expired' | ||
print('post-interaction') | ||
config = dict(ui.config) | ||
assert not await submit_page.wait(), f'The configuration process has expired' |
Check notice
Code scanning / Bandit
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note
self.config['verify_message'] = message.id | ||
async def on_submit(self, interaction: Interaction): | ||
try: | ||
assert len(self.config.get('modes')), "You must choose at least one verification mode!" |
Check notice
Code scanning / Bandit
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note
|
||
async def on_submit(self, interaction : Interaction): | ||
try: | ||
assert self.config.get('staff_role') is not None and self.config.get('inactive_role') is not None, "You must choose at least one staff role and one inactive role!" |
Check notice
Code scanning / Bandit
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note
async def on_submit(self, interaction : Interaction): | ||
try: | ||
assert self.config.get('staff_role') is not None and self.config.get('inactive_role') is not None, "You must choose at least one staff role and one inactive role!" | ||
assert self.config.get('staff_role') != self.config.get('inactive_role'), "The staff role and inactive role cannot be the same!" |
Check notice
Code scanning / Bandit
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note
No description provided.