Skip to content

Commit

Permalink
Remove unnecessary __repr__ and testing code
Browse files Browse the repository at this point in the history
  • Loading branch information
No767 committed Jan 2, 2024
1 parent 21c1dcd commit 461c618
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
25 changes: 2 additions & 23 deletions bot/cogs/dev_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,9 @@
from cogs import EXTENSIONS
from discord.ext import commands
from discord.ext.commands import Context, Greedy
from libs.utils import RoboContext, RoboView
from rodhaj import Rodhaj

from libs.utils import RoboContext

class MaybeView(RoboView):
def __init__(self, ctx: RoboContext) -> None:
super().__init__(ctx)

@discord.ui.button(label="eg")
async def eg(
self, interaction: discord.Interaction, button: discord.ui.Button
) -> None:
await interaction.response.send_message("yo nice oen", ephemeral=True)
from rodhaj import Rodhaj


class DevTools(commands.Cog, command_attrs=dict(hidden=True)):
Expand Down Expand Up @@ -88,17 +78,6 @@ async def reload_all(self, ctx: RoboContext) -> None:
await self.bot.reload_extension(extension)
await ctx.send("Successfully reloaded all extensions live")

@commands.command(name="view-test", hidden=True)
async def view_test(self, ctx: RoboContext) -> None:
view = MaybeView(ctx)
view.message = await ctx.send("yeo", view=view)

@commands.command(name="webhook-test")
async def webhook_test(self, ctx: RoboContext) -> None:
url = "yee"
webhook = discord.Webhook.from_url(url, session=self.bot.session)
await webhook.send("hi there", thread=discord.Object(1182960737476419584))


async def setup(bot: Rodhaj):
await bot.add_cog(DevTools(bot))
6 changes: 0 additions & 6 deletions bot/libs/tickets/structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ def __init__(self, record: Optional[asyncpg.Record] = None):
self.owner_id = record["owner_id"]
self.location_id = record["location_id"]

# For debugging purposes
def __repr__(self):
if self.id is None:
return f"<PartialTicket id={self.id}>"
return f"<PartialTicket id={self.id} thread_id={self.thread_id} owner_id={self.owner_id} location_id={self.location_id}>"


class PartialConfig:
__slots__ = ("id", "ticket_channel_id", "logging_channel_id")
Expand Down

0 comments on commit 461c618

Please sign in to comment.