8 Commits

Author SHA1 Message Date
classabbyamp 1160c73a56 release 2.10.0 2026-02-10 01:16:42 -05:00
Posimagi bff289d168 render morse conversion output in fixed width, and escape bullets at the start of morse deconversion
Linting / flake8 (push) Has been cancelled
Fixes: #484
2026-02-10 01:13:26 -05:00
Jason Schollenberger 6b4f985f07 Remove deprecated ae7q extension from options.py template 2026-02-10 01:08:22 -05:00
classabbyamp 312da11631 add deprecation notice 2026-02-10 01:03:33 -05:00
classabbyamp 3527df7cd9 fix indentation in some text responses 2026-02-10 01:03:33 -05:00
classabbyamp c8f42cb6b1 use discord application emojis 2026-02-10 01:03:33 -05:00
classabbyamp 926489ae3a run.sh: respect VIRTUAL_ENV 2026-02-10 01:03:33 -05:00
classabbyamp 8e4f8b3fe0 update pycord to 2.7.1, lint/fix issues, support python 3.14 2026-02-10 01:03:33 -05:00
12 changed files with 76 additions and 36 deletions
+17 -1
View File
@@ -7,6 +7,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
## [2.10.0] - 2026-02-10
### Added
- Support for Python 3.14.
- Bot deprecation notice in all embeds.
### Changed
- Updated Pycord to 2.7.1.
- `run.sh` to respect the `VIRTUAL_ENV` environment variable.
- Use Discord application emojis.
- Fix indentation in some text responses.
### Removed
- Deprecated `ae7q` extension from the default configuration (#486).
### Fixed
- Issue where ?morse/?demorse outputs beginning with `-` rendered as a bulleted list (#484).
## [2.9.2] - 2023-12-15
### Added
- `?drapmap` command to display NOAA D Region Absorption Predictions map.
@@ -255,7 +270,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## 1.0.0 - 2019-07-31 [YANKED]
[Unreleased]: https://github.com/miaowware/qrm2/compare/v2.9.2...HEAD
[Unreleased]: https://github.com/miaowware/qrm2/compare/v2.10.0...HEAD
[2.10.0]: https://github.com/miaowware/qrm2/releases/tag/v2.10.0
[2.9.2]: https://github.com/miaowware/qrm2/releases/tag/v2.9.2
[2.9.1]: https://github.com/miaowware/qrm2/releases/tag/v2.9.1
[2.9.0]: https://github.com/miaowware/qrm2/releases/tag/v2.9.0
+6 -6
View File
@@ -1,10 +1,10 @@
FROM ghcr.io/void-linux/void-musl-full
FROM ghcr.io/void-linux/void-glibc-full
COPY . /app
WORKDIR /app
ARG REPOSITORY=https://repo-fastly.voidlinux.org/current
ARG PKGS="cairo libjpeg-turbo"
ARG PKGS="cairo libjpeg-turbo libgcc"
ARG UID 1000
ARG GID 1000
@@ -13,18 +13,18 @@ RUN \
xbps-install -Suy xbps -R ${REPOSITORY} && \
xbps-install -uy -R ${REPOSITORY} && \
echo "**** install system packages ****" && \
xbps-install -y -R ${REPOSITORY} ${PKGS} python3.11 && \
xbps-install -y -R ${REPOSITORY} ${PKGS} python3 && \
echo "**** install pip packages ****" && \
python3.11 -m venv botenv && \
python3 -m venv botenv && \
botenv/bin/pip install -U pip setuptools wheel && \
botenv/bin/pip install -r requirements.txt && \
botenv/bin/pip install --ignore-requires-python -r requirements.txt && \
echo "**** clean up ****" && \
rm -rf \
/root/.cache \
/tmp/* \
/var/cache/xbps/*
ENV PYTHONUNBUFFERED 1
ENV PYTHONUNBUFFERED=1
USER $UID:$GID
+8 -2
View File
@@ -7,7 +7,7 @@ SPDX-License-Identifier: LiLiQ-Rplus-1.1
"""
import collections
import collections.abc
import enum
import json
import re
@@ -166,8 +166,14 @@ class GlobalChannelConverter(commands.IDConverter):
def embed_factory(ctx: commands.Context) -> discord.Embed:
"""Creates an embed with neutral colour and standard footer."""
embed = discord.Embed(timestamp=datetime.now(timezone.utc), colour=colours.neutral)
if opt.deprecation_mode:
embed.add_field(name="⚠️ Warning ⚠️",
value=("QRM development has ended. "
"This bot may go offline at some point in the future. "
"For more information, visit [here](https://miaow.io/goodbye-discord)."),
inline=False)
if ctx.author:
embed.set_footer(text=str(ctx.author), icon_url=str(ctx.author.display_avatar))
embed.set_footer(text=str(ctx.author), icon_url=str(ctx.author.avatar))
return embed
+4 -7
View File
@@ -7,6 +7,7 @@ SPDX-License-Identifier: LiLiQ-Rplus-1.1
"""
import inspect
import random
import re
from typing import Union, Iterable
@@ -187,11 +188,11 @@ class BaseCog(commands.Cog):
"""Shows info about qrm."""
embed = cmn.embed_factory(ctx)
embed.title = "About qrm"
embed.description = info.description
embed.description = inspect.cleandoc(info.description)
embed.add_field(name="Authors", value=", ".join(info.authors))
embed.add_field(name="License", value=info.license)
embed.add_field(name="Version", value=f"v{info.release} {'(`' + self.commit + '`)' if self.commit else ''}")
embed.add_field(name="Contributing", value=info.contributing, inline=False)
embed.add_field(name="Contributing", value=inspect.cleandoc(info.contributing), inline=False)
embed.add_field(name="Official Server", value=info.bot_server, inline=False)
embed.add_field(name="Donate", value="\n".join(f"{k}: {v}" for k, v in self.donation_links.items()),
inline=False)
@@ -255,11 +256,7 @@ class BaseCog(commands.Cog):
"""Shows how to create a bug report or feature request about the bot."""
embed = cmn.embed_factory(ctx)
embed.title = "Found a bug? Have a feature request?"
embed.description = """Submit an issue on the [issue tracker](https://github.com/miaowware/qrm2/issues)!
All issues and requests related to resources (including maps, band charts, data) \
should be added in \
[miaowware/qrm-resources](https://github.com/miaowware/qrm-resources/issues)."""
embed.description = inspect.cleandoc(info.issue_tracker)
await ctx.send(embed=embed)
@commands.command(name="donate", aliases=["tip"], category=cmn.BoltCats.INFO)
+2 -2
View File
@@ -34,7 +34,7 @@ class MorseCog(commands.Cog):
result += " "
embed = cmn.embed_factory(ctx)
embed.title = f"Morse Code for {msg}"
embed.description = "**" + result + "**"
embed.description = "**`" + result + "`**"
embed.colour = cmn.colours.good
await ctx.send(embed=embed)
@@ -54,7 +54,7 @@ class MorseCog(commands.Cog):
result += " "
embed = cmn.embed_factory(ctx)
embed.title = f"ASCII for {msg0}"
embed.description = result
embed.description = "`" + result + "`"
embed.colour = cmn.colours.good
await ctx.send(embed=embed)
+1 -1
View File
@@ -65,7 +65,7 @@ class TimeCog(commands.Cog):
embed.title = f"{cmn.emojis.clock} Military Time Zones Now"
embed.colour = cmn.colours.good
embed.description = "```"
embed.description += "\n".join([f"{x}: {time + z :%Y-%m-%d %H:%M} {y}" for x, y, z in self.offsets])
embed.description += "\n".join([f"{x}: {time + z:%Y-%m-%d %H:%M} {y}" for x, y, z in self.offsets])
embed.description += "```"
embed.add_field(name="Notes", value=(
"**J** is not present in the table, and is used for local time.\n"
+17 -6
View File
@@ -1,3 +1,4 @@
# flake8: noqa
"""
Static info about the bot.
---
@@ -8,11 +9,21 @@ SPDX-License-Identifier: LiLiQ-Rplus-1.1
authors = ("@classabbyamp", "@0x5c.io")
description = """A bot with various useful ham radio-related functions, written in Python."""
license = "Québec Free and Open-Source Licence Strong Reciprocity (LiLiQ-R+), version 1.1"
contributing = """Check out the [source on GitHub](https://github.com/miaowware/qrm2). Contributions are welcome!
description = """
A bot with various useful ham radio-related functions, written in Python.
All issues and requests related to resources (including maps, band charts, data) should be added \
in [miaowware/qrm-resources](https://github.com/miaowware/qrm-resources)."""
release = "2.9.2"
qrm is a <:miaowware_irl:678275824436379678> MiaowWare project.
"""
license = "Québec Free and Open-Source Licence Strong Reciprocity (LiLiQ-R+), version 1.1"
contributing = """
Check out the [source on GitHub](https://github.com/miaowware/qrm2). Contributions are welcome!
All issues and requests related to resources (including maps, band charts, data) should be added in [miaowware/qrm-resources](https://github.com/miaowware/qrm-resources).
"""
issue_tracker = """
Submit an issue on the [issue tracker](https://github.com/miaowware/qrm2/issues)!
All issues and requests related to resources (including maps, band charts, data) should be added in [miaowware/qrm-resources](https://github.com/miaowware/qrm-resources/issues).
"""
release = "2.10.0"
bot_server = "https://discord.gg/Ntbg3J4"
+6 -1
View File
@@ -44,7 +44,12 @@ debug_mode = opt.debug # Separate assignement in-case we define an override (te
# --- Bot setup ---
# Loop/aiohttp stuff
loop = asyncio.get_event_loop()
try:
loop = asyncio.get_event_loop()
except RuntimeError:
# restore <=3.13 get_event_loop() behaviour
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
connector = loop.run_until_complete(conn.new_connector())
# Defining the intents
+1 -1
View File
@@ -1,4 +1,4 @@
py-cord-dev[speed]==2.5.0rc5
py-cord[speed]==2.7.1
ctyparser~=2.0
gridtools~=1.0
callsignlookuptools[async]~=1.1
+2 -1
View File
@@ -6,12 +6,13 @@ Copyright (C) 2021-2023 classabbyamp, 0x5c
SPDX-License-Identifier: LiLiQ-Rplus-1.1
"""
import json
import utils.resources_models as models
print("Generating schema for index.json")
with open("./dev-notes/rs_index_schema.json", "w") as file:
file.write(models.Index.schema_json(indent=4))
json.dump(models.Index.model_json_schema(), file)
print("Done!")
+8 -6
View File
@@ -8,11 +8,13 @@
# https://github.com/0x5c/quick-bot-no-pain
# If $BOTENV is not defined, default to 'botenv'
if [ -z "$BOTENV" ]; then
BOTENV='botenv'
if [ -n "$VIRTUAL_ENV" ]; then
BOTENV="$VIRTUAL_ENV"
fi
if [ -z "$BOTENV" ]; then
BOTENV='./botenv'
fi
# Argument handling
_PASS_ERRORS=0
@@ -34,9 +36,9 @@ while [ -n "$1" ]; do
done
# If $PYTHON_BIN is not defined, default to 'python3.11'
# If $PYTHON_BIN is not defined, default to 'python3'
if [ $_NO_BOTENV -eq 1 ] && [ -z "$PYTHON_BIN" ]; then
PYTHON_BIN='python3.11'
PYTHON_BIN='python3'
fi
@@ -71,7 +73,7 @@ while true; do
if [ $_NO_BOTENV -eq 1 ]; then
"$PYTHON_BIN" main.py "$@"
else
"./$BOTENV/bin/python3" main.py "$@"
"$BOTENV/bin/python3" main.py "$@"
fi
err=$?
_message="$0: The bot exited with [$err]"
+4 -2
View File
@@ -24,6 +24,9 @@ display_prefix = "?"
# or be nice and only print small messages: `False` (the default).
debug = False
# Whether the bot should print a deprecation notice in all embeds
deprecation_mode = True
# A tuple of user IDs that should be considered "bot owners".
# * Those users will have full control over the bot.
# ! This MUST be a tuple of integers. Single element tuple: `(123,)`
@@ -32,7 +35,6 @@ owners_uids = (200102491231092736, 564766093051166729)
# The extensions to load when running the bot.
exts = [
"base",
"ae7q",
"callsign",
"codes",
"contests",
@@ -89,7 +91,7 @@ show_help = False
msg_reacts = {}
# A :pika: emote's ID, None for no emote :c
pika = 658733876176355338
pika = 1271888780340756651
# Base URL to a deployment of rTeX, which performs LaTeX rendering.
rtex_instance = "https://rtex.probablyaweb.site/"