Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/raidensakura/modmail int…
Browse files Browse the repository at this point in the history
…o develop
  • Loading branch information
raidensakura committed Mar 31, 2024
2 parents e1f756d + 4828996 commit cfab16f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 20 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install dependencies
run: |
python -m pip install black ruff
- uses: Gr1N/setup-poetry@v9
- name: Cache poetry
id: cache-poetry
uses: actions/[email protected]
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Maybe install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: poetry install --no-root --only dev
- name: Ruff
run: ruff . --no-fix
run: poetry run ruff . --no-fix --config pyproject.toml
continue-on-error: true
- name: Black
run: |
black . --diff --check
poetry run black . --diff --check --config pyproject.toml
9 changes: 3 additions & 6 deletions .github/workflows/load-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,24 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v8
- uses: Gr1N/setup-poetry@v9
- name: Cache poetry
id: cache-poetry
uses: actions/cache@v3
uses: actions/cache@v4.0.2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}

- name: Maybe install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: poetry install --no-root

- name: Run script loadcheck.py
run: |
poetry run python .github/workflows/scripts/loadcheck.py
env:
TOKEN: ${{ secrets.DISCORD_TEST_BOT }}
CONNECTION_URI: ${{ secrets.CONNECTION_URI }}
LOG_URL: https://domain.example
GUILD_ID: "616969119685935162"
MODMAIL_GUILD_ID: "1100011945207271494"
GUILD_ID: "1100011945207271494"
OWNERS: "243316261264556032,505386507440488458"
DATA_COLLECTION: off
LOG_LEVEL: DEBUG
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ This guide assume you already have Docker or Docker Compose installed.
Issues with this fork can be opened through [GitHub Issues](https://github.com/raidensakura/modmail/issues/new/choose).

Support for this forked version of Modmail can be requested through [Raiden's Discord server](https://dsc.gg/transience).
As I don't have a dedicated team to answer questions and provide help, response may not be as fast as official support.
As I don't have a dedicated team to answer questions and provide help, it will be answered based on my availability.

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion cogs/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, user, repo=None, name=None, branch=None):
self.repo = repo
self.name = name
self.local = False
self.branch = branch if branch is not None else "stable"
self.branch = branch if branch is not None else "main"
self.url = f"https://github.com/{user}/{repo}/archive/{self.branch}.zip"
self.link = f"https://github.com/{user}/{repo}/tree/{self.branch}/{name}"

Expand Down
14 changes: 7 additions & 7 deletions cogs/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def cog_unload(self):

@commands.command()
@checks.has_permissions(PermissionLevel.REGULAR)
@utils.trigger_typing
@trigger_typing
async def changelog(self, ctx, version: str.lower = ""):
"""Shows the changelog of the Modmail."""
changelog = await Changelog.from_url(self.bot)
Expand Down Expand Up @@ -310,7 +310,7 @@ async def changelog(self, ctx, version: str.lower = ""):

@commands.command(aliases=["info"])
@checks.has_permissions(PermissionLevel.REGULAR)
@utils.trigger_typing
@trigger_typing
async def about(self, ctx):
"""Shows information about this bot."""
embed = discord.Embed(color=self.bot.main_color, timestamp=discord.utils.utcnow())
Expand Down Expand Up @@ -381,7 +381,7 @@ async def about(self, ctx):

@commands.command(aliases=["sponsor"])
@checks.has_permissions(PermissionLevel.REGULAR)
@utils.trigger_typing
@trigger_typing
async def sponsors(self, ctx):
"""Shows the sponsors of this project."""

Expand All @@ -403,7 +403,7 @@ async def sponsors(self, ctx):

@commands.group(invoke_without_command=True)
@checks.has_permissions(PermissionLevel.OWNER)
@utils.trigger_typing
@trigger_typing
async def debug(self, ctx):
"""Shows the recent application logs of the bot."""

Expand Down Expand Up @@ -456,7 +456,7 @@ async def debug(self, ctx):

@debug.command(name="hastebin", aliases=["haste"])
@checks.has_permissions(PermissionLevel.OWNER)
@utils.trigger_typing
@trigger_typing
async def debug_hastebin(self, ctx):
"""Posts application-logs to Hastebin."""

Expand Down Expand Up @@ -493,7 +493,7 @@ async def debug_hastebin(self, ctx):

@debug.command(name="clear", aliases=["wipe"])
@checks.has_permissions(PermissionLevel.OWNER)
@utils.trigger_typing
@trigger_typing
async def debug_clear(self, ctx):
"""Clears the locally cached logs."""

Expand Down Expand Up @@ -670,7 +670,7 @@ async def before_loop_presence(self):

@commands.command()
@checks.has_permissions(PermissionLevel.ADMINISTRATOR)
@utils.trigger_typing
@trigger_typing
async def ping(self, ctx):
"""Pong! Returns your websocket latency."""
embed = discord.Embed(
Expand Down

0 comments on commit cfab16f

Please sign in to comment.