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

Ggsbot UI elements #58

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from
Draft

Ggsbot UI elements #58

wants to merge 27 commits into from

Conversation

GitGinocchio
Copy link
Owner

No description provided.

src/commands/games/CheapGames.py Fixed Show fixed Hide fixed
src/commands/games/CheapGames.py Fixed Show fixed Hide fixed
src/commands/manager/CommandsManager.py Fixed Show fixed Hide fixed
src/commands/manager/ExtensionsUi.py Fixed Show fixed Hide fixed
src/commands/manager/ExtensionsUi.py Fixed Show fixed Hide fixed
src/commands/manager/ExtensionsUi.py Fixed Show fixed Hide fixed
@GitGinocchio GitGinocchio reopened this Jan 17, 2025
@GitGinocchio GitGinocchio marked this pull request as draft January 17, 2025 21:25
@GitGinocchio
Copy link
Owner Author

GitGinocchio commented Jan 19, 2025

  • continuare la creazione dell'algoritmo per l'aggiornamento dei deals
  • Completare la pagina per il deal
  • commentare i decorator spiegando come agiscono
  • eliminare tutti gli AssertionError segnalato

@GitGinocchio
Copy link
Owner Author

GitGinocchio commented Jan 19, 2025

Nella classe UiPage sostituire il parametro callback dei bottoni

da self.on_next
a on_next_button(self.on_next)

Così da garantire che anche se si fa l'override del metodo self.on_next comunque si mantiene il comportamento del decorator

@GitGinocchio
Copy link
Owner Author

GitGinocchio commented Jan 20, 2025

server logs

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

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
# 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

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
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

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
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

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.

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

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
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

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant