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

Red 3.5 - Add new features to some cogs #89

Merged
merged 71 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
1bb5ac0
Add selects to `statusset add`
Vexed01 Mar 7, 2022
3561414
info.json Red vers - 3.5.0.dev0 to 3.5.99
Vexed01 Mar 7, 2022
928f37b
Remove pyright checking from GH Actions
Vexed01 Mar 7, 2022
11d9a7f
Merge branch 'master' into red3.5
Vexed01 Mar 8, 2022
7102c68
change title text
Vexed01 Mar 15, 2022
776aab7
Always await bot.add_cog
Vexed01 Mar 23, 2022
ad0c133
blocked check
Vexed01 Mar 23, 2022
a3b3bb5
aa
Vexed01 Mar 23, 2022
30858af
async cog_unload
Vexed01 Mar 23, 2022
6b4676f
Make use of new cog_load method
Vexed01 Mar 23, 2022
32e99fc
labelssss
Vexed01 Mar 23, 2022
975a42b
empty commit lol
Vexed01 Mar 23, 2022
46ad32d
another high quality empty commit
Vexed01 Mar 24, 2022
fa61e44
[APC] send `pingset settings` embeds in 1 message
Vexed01 Mar 24, 2022
63b08cf
Merge branch 'master' into remove_3.4_support
Vexed01 Apr 5, 2022
f4853c0
Merge branch 'master' into red3.5
Vexed01 Apr 5, 2022
b523381
update for dpy breaking changes
Vexed01 Apr 5, 2022
f1c81c7
Merge branch 'master' into red3.5
Vexed01 Apr 5, 2022
d31e3c9
Merge branch 'master' into red3.5
Vexed01 Apr 6, 2022
be8dcf2
Modal for Birthday setup
Vexed01 Apr 6, 2022
09f218b
oops
Vexed01 Apr 6, 2022
d46891f
Merge branch 'remove_3.4_support' into red3.5
Vexed01 Apr 6, 2022
20d53a7
Merge branch 'master' into red3.5
Vexed01 Apr 6, 2022
18e404c
[Meta] Add ko-fi link
Vexed01 Apr 6, 2022
ab65a64
That last commit was on the wrong branch...
Vexed01 Apr 6, 2022
a300154
add a debug command
Vexed01 Apr 7, 2022
3d1507e
change lang
Vexed01 Apr 7, 2022
5a481cf
Fix betteruptime commands+loop
Vexed01 Apr 8, 2022
16426ba
add selects to stattrack
Vexed01 Apr 8, 2022
fcd6128
slight change to stattrack UX
Vexed01 Apr 8, 2022
bbe3cc0
stattrack select improvements
Vexed01 Apr 8, 2022
3dc7a35
stattrack + system
Vexed01 Apr 9, 2022
eb895b6
probs fix status
Vexed01 Apr 11, 2022
3328ec7
betteruptime fix
Vexed01 Apr 11, 2022
80d0036
Merge branch 'master' into red3.5
Vexed01 Apr 14, 2022
9278ca9
birthday - add buttons to bdset stop
Vexed01 Apr 14, 2022
fc3c268
New red logging
Vexed01 Apr 18, 2022
316ea42
further caseinsensitive dpy2 dpy2 compatibilit
Vexed01 Apr 18, 2022
c54d475
logging stuff
Vexed01 Apr 18, 2022
d85ecd0
Further logging enhanements
Vexed01 Apr 18, 2022
3da02fe
Pandas logging enhancements
Vexed01 Apr 18, 2022
635e57b
Merge branch 'master' into red3.5
Vexed01 Apr 18, 2022
94eb7d4
hmm
Vexed01 Apr 18, 2022
1b6c757
Merge branch 'master' into red3.5
Vexed01 May 3, 2022
c4ed1ac
modaly stuff
Vexed01 May 31, 2022
1658b6a
defer
Vexed01 May 31, 2022
3df4f7b
Merge branch 'master' into red3.5
Vexed01 May 31, 2022
338d04a
Merge branch 'master' of https://github.com/Vexed01/Vex-Cogs into red3.5
Vexed01 Oct 25, 2022
c05362d
[Birthday] Fix discord's breakages
Vexed01 Oct 25, 2022
85f1cd7
Merge branch 'master' of https://github.com/Vexed01/Vex-Cogs into red3.5
Vexed01 Oct 25, 2022
74c684e
[Roleplay] don't error if footer or image aren't set
Vexed01 Nov 10, 2022
63f3a09
Merge branch 'master' into red3.5
Vexed01 Apr 18, 2023
c81e3c8
Merge branch 'master' into red3.5
Vexed01 Apr 26, 2023
0e9fbdf
Update max bot version
Vexed01 Apr 26, 2023
18dd7b6
Remvoe dpy 2 mention in ghissues
Vexed01 Apr 26, 2023
731651b
Merge branch 'master' into red3.5
Vexed01 Apr 27, 2023
fc066b5
[GitHub] Remove cog, in favour of ghissues
Vexed01 Apr 28, 2023
6582a3c
AnotherPingCog slash commands
Vexed01 Apr 28, 2023
4b5555c
[BetterUptime] Slash commands
Vexed01 Apr 29, 2023
b8fe8d2
Start birthday slash commands
Vexed01 May 1, 2023
a8d5d57
Merge branch 'master' into red3.5
Vexed01 May 1, 2023
615440b
Update GH actions versions
Vexed01 May 1, 2023
c30f393
[CmdLog] Include new exception for arg errors
Vexed01 May 1, 2023
11069c7
Remove CovidGraph cog
Vexed01 May 1, 2023
5d82273
Workflow updates for Red 3.5
Vexed01 May 1, 2023
34c4e89
Changelogs & version bumps
Vexed01 May 4, 2023
3e8e26c
Docs update
Vexed01 May 4, 2023
64ab8bb
More doc updates
Vexed01 May 4, 2023
b0c740e
Add RTD config file
Vexed01 May 4, 2023
217a870
Works towards #110
Vexed01 May 4, 2023
1c67fcb
info.json updates
Vexed01 May 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
python_version:
- "3.8"
- "3.9"
- "3.11"
tox_env:
- style-black
- style-isort
Expand All @@ -40,17 +40,17 @@ jobs:

name: Tox - ${{ matrix.python_version }} - ${{ matrix.friendly_name }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ env.ref }}
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}

# caching cuts down time for tox (for example black) from ~40 secs to 4
- name: Cache tox
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .tox
key: tox-${{ matrix.python_version }}-${{ matrix.tox_env }}-${{ hashFiles('tox.ini') }}
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/loadcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,26 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9"]
red-version:
# this workflow required pr #5453 commit d27dbde, which is in dev & pypi 3.4.15+
- "git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=Red-DiscordBot"
- "Red-DiscordBot==3.4.16"
python-version: ["3.8", "3.11"]
include:
- red-version: "git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=Red-DiscordBot"
friendly-red: "Red (dev version)"
- red-version: "Red-DiscordBot==3.4.16"
friendly-red: "Red 3.4.16"
- red-version: "Red-DiscordBot==3.4.19"
friendly-red: "Red 3.4.19"
fail-fast: false

name: Cog load test - Python ${{ matrix.python-version }} & ${{ matrix.friendly-red }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Cache venv
id: cache-venv
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .venv
key: ${{ matrix.red-version }}-${{ matrix.python-version }}-${{ hashFiles('dev-requirements.txt') }}-${{ secrets.CACHE_V }}
Expand Down Expand Up @@ -62,7 +58,7 @@ jobs:

- name: Save Red output as Artifact
if: always() # still run if prev step failed
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: "Red log - Python ${{ matrix.python-version }} & ${{ matrix.friendly-red }}"
path: red.log
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.11"]

name: Release
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.11

- name: Install dependencies
run: |
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/scripts/loadcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,19 @@
# let Red boot up
time.sleep(10)

# not compatible with dpy 1.x
# ["buttonpoll", "ghissues"]

cogs = [
"aliases",
"anotherpingcog",
"beautify",
"betteruptime",
"buttonpoll",
"birthday",
"calc",
"caseinsensitive",
"cmdlog",
"covidgraph",
"fivemstatus",
"github",
"googletrends",
"ghissues",
"madtranslate",
"roleplay",
"stattrack",
Expand All @@ -53,10 +51,6 @@
"timechannel",
"uptimeresponder",
"wol",
# dpy 2 cogs:
# "buttonpoll",
# "ghissues",
# "calc",
]


Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/scripts/syncutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@
"calc",
"caseinsensitive",
"cmdlog",
"covidgraph",
"fivemstatus",
"github",
"googletrends",
"ghissues",
"madtranslate",
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/syncutils.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.11"]

name: Sync utils
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install gitpython requests
- name: Install dependencies
run: |
pip install gitpython requests

- name: Run script syncutils.py
run: |
python .github/workflows/scripts/syncutils.py
env:
CF_KV: ${{ secrets.CF_KV}}
- name: Run script syncutils.py
run: |
python .github/workflows/scripts/syncutils.py
env:
CF_KV: ${{ secrets.CF_KV}}

- name: "Commit and push changes"
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Automated utils sync
- name: "Commit and push changes"
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Automated utils sync
13 changes: 13 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

sphinx:
configuration: docs/conf.py

python:
install:
- requirements: docs/requirements.txt
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ There's a list of cogs below, or you can use `[p]cog list vex-cogs` if you've ad
| [beautify](https://go.vexcodes.com/c/beautify) | Beautify and minify JSON. |
| [betteruptime](https://go.vexcodes.com/c/betteruptime) | See your bot's uptime percentages and check when downtime happened. |
| [birthday](https://go.vexcodes.com/c/birthday) | Birthday cog with customisable messages and roles. |
| [buttonpoll](https://go.vexcodes.com/c/buttonpoll) | Create polls with buttons! |
| [calc](https://go.vexcodes.com/c/calc) | A simple button-based calculator. |
| [caseinsensitive](https://go.vexcodes.com/c/caseinsensitive) | Make all prefixes and commands case insensitive. |
| [cmdlog](https://go.vexcodes.com/c/cmdlog) | Track command usage, searchable by user, server or command name. |
| [covidgraph](https://go.vexcodes.com/c/covidgraph) | Get graphs of COVID-19 data. |
| [fivemstatus](https://go.vexcodes.com/c/fivemstatus) | View the live status of a FiveM server, in a updating Discord message. |
| [github](https://go.vexcodes.com/c/github) | Create, comment, labelify and close GitHub issues, with partial PR support. |
| [ghissues](https://go.vexcodes.com/c/ghissues) | Create, comment, labelify and close GitHub issues, with some PR support. |
| [googletrends](https://go.vexcodes.com/c/googletrends) | Find out what the world is searching, right from Discord. |
| [madtranslate](https://go.vexcodes.com/c/madtranslate) | Translate text through lots of languages. Get some funny results! |
| [roleplay](https://go.vexcodes.com/c/roleplay) | Create an anonymous role play in your server. |
Expand Down
4 changes: 1 addition & 3 deletions aliases/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ async def setup(bot: Red) -> None:
cog = Aliases(bot)
await out_of_date_check("aliases", cog.__version__)

r = bot.add_cog(cog)
if r is not None:
await r
await bot.add_cog(cog)
3 changes: 1 addition & 2 deletions aliases/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"description": "Get all the information you could ever need about a command's aliases. IF YOU ARE TRYING TO *MAKE* ALIASES, JUST USE THE CORE 'alias` COG.",
"end_user_data_statement": "This cog does not persistently store data or metadata about users.",
"install_msg": "\\N{WARNING SIGN}\\N{VARIATION SELECTOR-16}\nThis cog reads the config of the alias cog. This means it might break without much notice.\n\nIf you are just trying to **make aliases**: this cog isn't for that. Use the core `alias` cog to make and manage aliases with the `[p]load alias` command, then `[p]help alias`.\n\nThis cog has docs! Check them out at <https://go.vexcodes.com/c/aliases>",
"max_bot_version": "3.6.0.dev0",
"min_bot_version": "3.4.0",
"min_bot_version": "3.5.1",
"min_python_version": [
3,
8,
Expand Down
9 changes: 5 additions & 4 deletions aliases/vexutils/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

import asyncio
import json
from logging import Logger, getLogger
from pathlib import Path
from typing import Literal, NamedTuple

import aiohttp
from red_commons.logging import RedTraceLogger
from red_commons.logging import getLogger as red_get_logger
from redbot.core import VersionInfo, commands
from redbot.core import version_info as cur_red_version
from rich import box as rich_box
Expand All @@ -16,13 +17,13 @@
from .consts import DOCS_BASE, GREEN_CIRCLE, RED_CIRCLE
from .loop import VexLoop

log = getLogger("red.vex-utils")
log = red_get_logger("red.vex-utils")


cog_ver_lock = asyncio.Lock()


def get_vex_logger(name: str) -> Logger:
def get_vex_logger(name: str) -> RedTraceLogger:
"""Get a logger for the given name.

Parameters
Expand All @@ -42,7 +43,7 @@ def get_vex_logger(name: str) -> Logger:
else: # otherwise use full path
final_name += name

return getLogger(final_name)
return red_get_logger(final_name)


def format_help(self: commands.Cog, ctx: commands.Context) -> str:
Expand Down
Loading