Skip to content

Commit

Permalink
Merge pull request #137 from satisfactorymodding/dev
Browse files Browse the repository at this point in the history
2.22.3
  • Loading branch information
Borketh authored Sep 11, 2024
2 parents 4e42e45 + 0661a5a commit 7472fc8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM python:3.12-alpine AS runtime
VOLUME /config
WORKDIR /app

RUN apk update; apk add --no-cache tesseract-ocr-data-eng
RUN apk update; apk add --no-cache tesseract-ocr-data-eng re2
#ENV DEBIAN_FRONTEND=noninteractive APT="apt-get -qq"
#RUN $APT update; \
# $APT install tesseract-ocr; \
Expand Down
2 changes: 1 addition & 1 deletion fred/cogs/crashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from ..libraries.common import FredCog, new_logger
from ..libraries.createembed import CrashResponse

REGEX_LIMIT: float = 0.002
REGEX_LIMIT: float = 6.9
DOWNLOAD_SIZE_LIMIT = 104857600 # 100 MiB
EMOJI_CRASHES_ANALYZING = "<:FredAnalyzingFile:1283182945019891712>"
EMOJI_CRASHES_TIMEOUT = "<:FredAnalyzingTimedOut:1283183010967195730>"
Expand Down
6 changes: 3 additions & 3 deletions fred/fred.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from .fred_commands import Commands, FredHelpEmbed
from .libraries import createembed, common

__version__ = "2.22.2"
__version__ = "2.22.3"


class Bot(commands.Bot):
Expand Down Expand Up @@ -49,7 +49,7 @@ def __init__(self, *args, **kwargs):
self.web_session: aiohttp.ClientSession = ...
self.loop = asyncio.get_event_loop()
self.executor = ThreadPoolExecutor()
self._error_channel = int(chan) if (chan := config.Misc.fetch("error_channel")) else 748229790825185311
self.error_channel = int(chan) if (chan := config.Misc.fetch("error_channel")) else 748229790825185311

async def start(self, *args, **kwargs):
async with aiohttp.ClientSession() as session:
Expand Down Expand Up @@ -137,7 +137,7 @@ async def on_error(self, event_method: str, *args, **kwargs):
# error_embed = nextcord.Embed(colour=nextcord.Colour.red(), title=error_meta, description=full_error)
# error_embed.set_author(name=fred_str)

await self.get_channel(self._error_channel).send(f"**{fred_str}**\n{error_meta}\n```py\n{full_error}```")
await self.get_channel(self.error_channel).send(f"**{fred_str}**\n{error_meta}\n```py\n{full_error}```")

async def githook_send(self, data: dict):
self.logger.info("Handling GitHub payload", extra={"data": data})
Expand Down
14 changes: 14 additions & 0 deletions fred/fred_commands/bot_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,17 @@ async def owo(self, ctx: commands.Context):
Notes: owo what's this? you need to be engineer or above to use this"""
self.bot.owo = not self.bot.owo
await ctx.reply("OwO" if self.bot.owo else "no owo :(")

@commands.check(common.mod_only)
@BaseCmds.set.command(name="error_channel")
async def set_error_channel(self, ctx: commands.Context, error_channel_id: int):
"""Usage: `set error_channel [error_channel]`
Purpose: changes what error channel is used to send errors to.
Notes: no touchy please!
"""
if self.bot.get_channel(int(error_channel_id)) is None:
await self.bot.reply_to_msg(ctx.message, "I can't see that channel!")
else:
self.bot.error_channel = error_channel_id
config.Misc.change("error_channel", error_channel_id)
await self.bot.reply_to_msg(ctx.message, f"The error channel has been changed to {error_channel_id}.")
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "fred"
version = "2.22.2"
version = "2.22.3"
description = "A Discord bot for the Satisfactory Modding Discord "
authors = ["Feyko <[email protected]>", "Mircea Roata <[email protected]>", "Borketh <[email protected]>"]
license = "MIT License"
Expand Down

0 comments on commit 7472fc8

Please sign in to comment.