├── .gitattributes ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── style.yaml ├── .gitignore ├── .pre-commit-config.yaml ├── .utils ├── .gitignore ├── locales │ ├── fr-FR.po │ └── sv-SE.po └── utils.py ├── LICENSE.txt ├── Makefile ├── README.md ├── addimage ├── __init__.py ├── addimage.py ├── info.json └── locales │ ├── fr-FR.po │ ├── messages.pot │ └── sv-SE.po ├── adventurealert ├── __init__.py ├── abc.py ├── adventurealert.py ├── info.json ├── listeners.py └── locales │ ├── fr-FR.po │ └── sv-SE.po ├── alignment ├── __init__.py ├── alignment.py ├── converter.py ├── data │ └── SourceSansPro-SemiBold.ttf └── info.json ├── apngfilter ├── __init__.py ├── apngfilter.py ├── info.json └── locales │ ├── fr-FR.po │ └── sv-SE.po ├── automod ├── __init__.py ├── automod.py ├── converters.py ├── info.json └── menus.py ├── badges ├── __init__.py ├── badge_entry.py ├── badges.py ├── barcode.py ├── data │ └── arial.ttf ├── info.json ├── locales │ ├── fr-FR.po │ ├── messages.pot │ └── sv-SE.po └── templates.py ├── bingo ├── __init__.py ├── bingo.py ├── converter.py ├── data │ └── SourceSansPro-SemiBold.ttf └── info.json ├── cah ├── LICENSE ├── __init__.py ├── core.py ├── game.py └── info.json ├── citation ├── __init__.py ├── citation.py ├── citations │ ├── LICENSE │ ├── Readme.md │ ├── __init__.py │ ├── data │ │ ├── BMmini.ttf │ │ ├── Megan_Serif.ttf │ │ ├── crescent.png │ │ ├── moa.png │ │ └── stamp_bg.png │ ├── defaults.py │ ├── enums.py │ ├── factory.py │ └── themes.py └── info.json ├── cleverbot ├── __init__.py ├── api.py ├── cleverbot.py ├── errors.py ├── info.json └── locales │ ├── fr-FR.po │ └── sv-SE.po ├── compliment ├── __init__.py ├── compliment.py ├── info.json └── locales │ ├── fr-FR.po │ ├── messages.pot │ └── sv-SE.po ├── conversions ├── __init__.py ├── coin.py ├── conversions.py ├── errors.py ├── info.json └── locales │ ├── fr-FR.po │ └── sv-SE.po ├── crabrave ├── __init__.py ├── crabrave.py ├── info.json └── locales │ ├── fr-FR.po │ └── sv-SE.po ├── crowdin.yml ├── destiny ├── .gitignore ├── __init__.py ├── api.py ├── converter.py ├── destiny.py ├── errors.py ├── info.json ├── locales │ ├── fr-FR.po │ ├── messages.pot │ └── sv-SE.po └── menus.py ├── elements ├── __init__.py ├── core.py ├── data.py ├── info.json └── locales │ ├── fr-FR.po │ └── sv-SE.po ├── encoding ├── __init__.py ├── braille.py ├── encoding.py ├── info.json └── locales │ ├── fr-FR.po │ └── sv-SE.po ├── eventposter ├── __init__.py ├── event_obj.py ├── eventposter.py ├── info.json └── locales │ ├── fr-FR.po │ └── sv-SE.po ├── extendedmodlog ├── __init__.py ├── eventmixin.py ├── extendedmodlog.py ├── info.json ├── locales │ ├── fr-FR.po │ ├── messages.pot │ └── sv-SE.po └── settings.py ├── fenrir ├── __init__.py ├── fenrir.py ├── info.json └── locales │ ├── fr-FR.po │ └── sv-SE.po ├── fun ├── __init__.py ├── constants.py ├── fun.py ├── info.json └── locales │ ├── fr-FR.po │ └── sv-SE.po ├── hockey ├── __init__.py ├── abc.py ├── api.py ├── components.py ├── constants.py ├── dev.py ├── emoji.yaml ├── errors.py ├── game.py ├── gamedaychannels.py ├── gamedaythreads.py ├── goal.py ├── helper.py ├── hockey.py ├── hockey_commands.py ├── hockeypickems.py ├── hockeyset.py ├── info.json ├── locales │ ├── fr-FR.po │ ├── messages.pot │ ├── messages.txt │ └── sv-SE.po ├── menu.py ├── notifications.py ├── pickems.py ├── player.py ├── schedule.py ├── standings.py ├── stats.py └── teamentry.py ├── hue ├── __init__.py ├── api.py ├── hue.py ├── info.json └── locales │ ├── fr-FR.po │ └── sv-SE.po ├── imagemaker ├── __init__.py ├── converter.py ├── data │ ├── impact.ttf │ └── trump_template │ │ ├── Trump_00.png │ │ ├── Trump_02.png │ │ ├── Trump_03.png │ │ ├── Trump_05.png │ │ ├── Trump_06.png │ │ ├── Trump_07.png │ │ ├── Trump_08.png │ │ ├── Trump_09.png │ │ ├── Trump_11.png │ │ ├── Trump_12.png │ │ ├── Trump_14.png │ │ ├── Trump_15.png │ │ ├── Trump_16.png │ │ ├── Trump_17.png │ │ ├── Trump_18.png │ │ ├── Trump_21.png │ │ ├── Trump_22.png │ │ ├── Trump_24.png │ │ ├── Trump_25.png │ │ ├── Trump_26.png │ │ ├── Trump_28.png │ │ ├── Trump_29.png │ │ ├── Trump_30.png │ │ ├── Trump_32.png │ │ ├── Trump_33.png │ │ ├── Trump_35.png │ │ ├── Trump_37.png │ │ ├── Trump_38.png │ │ ├── Trump_39.png │ │ ├── Trump_41.png │ │ ├── Trump_42.png │ │ ├── Trump_43.png │ │ ├── Trump_44.png │ │ ├── Trump_45.png │ │ ├── Trump_46.png │ │ ├── Trump_47.png │ │ ├── Trump_48.png │ │ ├── Trump_49.png │ │ ├── Trump_50.png │ │ ├── Trump_51.png │ │ ├── Trump_52.png │ │ ├── Trump_54.png │ │ ├── Trump_55.png │ │ ├── Trump_57.png │ │ ├── Trump_59.png │ │ ├── Trump_60.png │ │ ├── Trump_62.png │ │ └── frames.json ├── imagemaker.py ├── info.json └── locales │ ├── fr-FR.po │ └── sv-SE.po ├── imgflip ├── __init__.py ├── imgflip.py ├── info.json └── locales │ ├── fr-FR.po │ └── sv-SE.po ├── info.json ├── insult ├── __init__.py ├── info.json ├── insult.py └── locales │ ├── fr-FR.po │ ├── messages.pot │ └── sv-SE.po ├── inviteblocklist ├── __init__.py ├── info.json ├── inviteblocklist.py └── locales │ ├── fr-FR.po │ └── sv-SE.po ├── loaddev ├── __init__.py ├── info.json ├── loaddev.py └── locales │ ├── fr-FR.po │ └── sv-SE.po ├── mentionprefix ├── __init__.py ├── info.json ├── locales │ ├── fr-FR.po │ └── sv-SE.po └── mentionprefix.py ├── mock ├── __init__.py ├── info.json ├── locales │ ├── fr-FR.po │ └── sv-SE.po └── mock.py ├── nasa ├── __init__.py ├── core.py ├── info.json ├── menus.py └── models.py ├── notsobot ├── README.md ├── __init__.py ├── converter.py ├── data │ ├── Minecraftia.ttf │ └── arial.ttf ├── info.json ├── locales │ ├── fr-FR.po │ └── sv-SE.po ├── notsobot.py ├── pixelsort │ ├── constants.py │ ├── interval.py │ ├── sorter.py │ ├── sorting.py │ └── util.py └── vw │ ├── img │ └── png │ │ ├── background │ │ └── geometric.jpg │ │ ├── bubbles │ │ ├── JavaUpdateAvailable.png │ │ ├── Windows Connection with Little connectivity.png │ │ ├── a screaming comes across the sky.png │ │ ├── faster.png │ │ ├── out of a fantasy.png │ │ ├── pluggeddeviceintoaudiojack.png │ │ ├── project a world.png │ │ └── stupid_bubble_by_Baka_Sora_Club.png │ │ ├── greek │ │ ├── greek1.png │ │ ├── greek2.png │ │ ├── greek3.png │ │ ├── greek4.png │ │ └── siddhartha.png │ │ ├── pics │ │ ├── ak47.png │ │ ├── blindblake.png │ │ ├── dolphin.png │ │ ├── drip.png │ │ ├── fiji.png │ │ ├── gun.png │ │ ├── knife.png │ │ └── knuckle.png │ │ └── windows │ │ ├── 98-problem.jpg │ │ ├── 9x-wu4.png │ │ ├── C2FAT32.gif │ │ ├── IPC_MPI_CP5611_1.gif │ │ ├── Windows_98_-_Critical_Update_Notification.png │ │ ├── au_15.gif │ │ ├── au_16.gif │ │ ├── au_20.gif │ │ ├── create_disk_image.gif │ │ ├── ht1338-alert-001-en.png │ │ ├── regedit.gif │ │ ├── screenshot.png │ │ ├── sysinfo.gif │ │ ├── update.gif │ │ ├── win98.png │ │ └── winnt31.png │ ├── macintoshplus.py │ └── resources │ └── arial.ttf ├── pyproject.toml ├── reddit ├── __init__.py ├── helpers.py ├── info.json ├── locales │ ├── fr-FR.po │ └── sv-SE.po ├── menus.py └── reddit.py ├── rekt ├── __init__.py ├── info.json ├── locales │ ├── fr-FR.po │ ├── messages.pot │ └── sv-SE.po └── rekt.py ├── requirements.txt ├── retrigger ├── README.md ├── __init__.py ├── abc.py ├── converters.py ├── info.json ├── locales │ ├── fr-FR.po │ ├── messages.pot │ └── sv-SE.po ├── menus.py ├── message.py ├── retrigger.py ├── slash.py └── triggerhandler.py ├── roletools ├── __init__.py ├── abc.py ├── buttons.py ├── components.py ├── converter.py ├── events.py ├── exclusive.py ├── inclusive.py ├── info.json ├── locales │ ├── fr-FR.po │ └── sv-SE.po ├── menus.py ├── messages.py ├── reactions.py ├── requires.py ├── roletools.py ├── select.py └── settings.py ├── runescape ├── __init__.py ├── helpers.py ├── info.json ├── locales │ ├── fr-FR.po │ └── sv-SE.po ├── menus.py ├── profile.py ├── rsrandom.py ├── runescape.py ├── tms.py ├── viswax.py ├── wikiapi.py ├── wilderness.py └── xp.py ├── serverstats ├── __init__.py ├── converters.py ├── info.json ├── locales │ ├── fr-fr.po │ ├── messages.pot │ └── sv-SE.po ├── menus.py └── serverstats.py ├── spotify ├── __init__.py ├── abc.py ├── components.py ├── helpers.py ├── info.json ├── locales │ ├── fr-FR.po │ └── sv-SE.po ├── menus.py ├── rpc.py ├── spotify.py └── spotify_commands.py ├── starboard ├── __init__.py ├── converters.py ├── events.py ├── info.json ├── locales │ ├── fr-FR.po │ ├── messages.pot │ └── sv-SE.po ├── starboard.py └── starboard_entry.py ├── tarot ├── __init__.py ├── info.json ├── locales │ ├── fr-FR.po │ └── sv-SE.po ├── tarot_cards.py └── tarotreading.py ├── timestamp ├── __init__.py ├── info.json └── timestamp.py ├── tox.ini ├── translate ├── __init__.py ├── api.py ├── converters.py ├── errors.py ├── flags.py ├── info.json ├── locales │ ├── fr-FR.po │ ├── messages.pot │ └── sv-SE.po └── translate.py ├── trusty-cogs.sublime-project ├── tweets ├── __init__.py ├── info.json ├── locales │ ├── fr-FR.po │ ├── messages.pot │ └── sv-SE.po ├── menus.py ├── tweet_entry.py ├── tweets.py └── tweets_api.py ├── twitch ├── __init__.py ├── errors.py ├── info.json ├── locales │ ├── fr-FR.po │ └── sv-SE.po ├── menus.py ├── twitch.py ├── twitch_api.py └── twitch_models.py ├── weather ├── __init__.py ├── api.py ├── info.json ├── locales │ ├── fr-FR.po │ ├── messages.pot │ └── sv-SE.po ├── menus.py └── weather.py └── welcome ├── __init__.py ├── events.py ├── info.json ├── locales ├── fr-FR.po ├── messages.pot └── sv-SE.po ├── menus.py └── welcome.py /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | patreon: TrustyJAID 4 | ko_fi: trustyjaid 5 | custom: ["https://www.paypal.me/trustyjaid", "https://trustyjaid.com"] 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Additional context** 27 | Add any other context about the problem here. 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/style.yaml: -------------------------------------------------------------------------------- 1 | name: Style formatting 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | stylecheck: 7 | name: Style check with Black and iSort 8 | runs-on: ubuntu-latest 9 | strategy: 10 | matrix: 11 | python: ["3.9", "3.10", "3.11", "3.12", "3.13"] 12 | steps: 13 | - uses: actions/checkout@v4 14 | - name: Setup Python 15 | uses: actions/setup-python@v5 16 | with: 17 | python-version: ${{ matrix.python }} 18 | - name: Display Python version 19 | run: python -c "import sys; print(sys.version)" 20 | - name: Install Black and iSort 21 | run: "python -m pip install black==22.3.0 isort==5.10.1" 22 | - name: Run stylediff 23 | run: "make stylediff" 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | __pycache__/ 49 | audiotest/ 50 | trusty-cogs.sublime-workspace 51 | *.sublime-workspace 52 | .idea/ -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | default_language_version: 2 | python: python3.8 3 | fail_fast: false 4 | ci: 5 | skip: [readmegen, makerequirements] 6 | autoupdate_schedule: quarterly 7 | exclude: '^.+\.pot?$' 8 | repos: 9 | - repo: local 10 | hooks: 11 | - id: readmegen 12 | name: readmegen 13 | description: >- 14 | Script to automatically generate readme.md 15 | entry: python ./.utils/utils.py makereadme 16 | language: python 17 | additional_dependencies: 18 | - babel~=2.9.0 19 | - tabulate~=0.8.9 20 | - click 21 | always_run: true 22 | pass_filenames: false 23 | require_serial: true 24 | verbose: true 25 | - id: requirementsgen 26 | name: requirementsgen 27 | description: >- 28 | Script to automatically generate requirements.txt 29 | entry: python ./.utils/utils.py makerequirements 30 | language: python 31 | additional_dependencies: 32 | - babel~=2.9.0 33 | - tabulate~=0.8.9 34 | - click 35 | always_run: true 36 | pass_filenames: false 37 | require_serial: true 38 | verbose: true 39 | - repo: https://github.com/pre-commit/pre-commit-hooks 40 | rev: v4.1.0 41 | hooks: 42 | - id: check-yaml 43 | - id: end-of-file-fixer 44 | - id: trailing-whitespace 45 | - id: check-builtin-literals 46 | - id: check-ast 47 | - id: check-docstring-first 48 | - id: check-json 49 | - id: detect-private-key 50 | - id: check-toml 51 | - id: pretty-format-json 52 | args: 53 | - "--autofix" 54 | - "--indent=4" 55 | - "--no-sort-keys" 56 | - id: requirements-txt-fixer 57 | - id: trailing-whitespace 58 | args: [--markdown-linebreak-ext=md] 59 | 60 | - repo: https://github.com/psf/black 61 | rev: '22.3.0' 62 | hooks: 63 | - id: black 64 | - repo: https://github.com/Pierre-Sassoulas/black-disable-checker 65 | rev: '1.0.1' 66 | hooks: 67 | - id: black-disable-checker 68 | - repo: https://github.com/pycqa/isort 69 | rev: '5.10.1' 70 | hooks: 71 | - id: isort 72 | -------------------------------------------------------------------------------- /.utils/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | *.log 42 | 43 | # Directories potentially created on remote AFP share 44 | .AppleDB 45 | .AppleDesktop 46 | Network Trash Folder 47 | Temporary Items 48 | .apdisk 49 | __pycache__/ 50 | audiotest/ 51 | trusty-cogs.sublime-workspace 52 | *.sublime-workspace 53 | -------------------------------------------------------------------------------- /.utils/locales/fr-FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2022-04-22 20:47\n" 6 | "Last-Translator: \n" 7 | "Language-Team: French\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: fr\n" 16 | "X-Crowdin-File: /dpy-2.0/.utils/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 422\n" 18 | "Language: fr_FR\n" 19 | 20 | #: .utils/utils.py:173 21 | #, docstring 22 | msgid "Utilities for Cog creation!" 23 | msgstr "" 24 | 25 | #: .utils/utils.py:179 26 | #, docstring 27 | msgid "Ensure all info.json files are up-to-date with current standards" 28 | msgstr "" 29 | 30 | #: .utils/utils.py:299 31 | #, docstring 32 | msgid "Generate a new info.json file for your new cog!" 33 | msgstr "" 34 | 35 | #: .utils/utils.py:339 .utils/utils.py:389 36 | #, docstring 37 | msgid "Count the number of lines of .py files in all folders" 38 | msgstr "" 39 | 40 | #: .utils/utils.py:426 41 | #, docstring 42 | msgid "Generate README.md from info about all cogs" 43 | msgstr "" 44 | 45 | #: .utils/utils.py:472 46 | #, docstring 47 | msgid "Generate a requirements.txt for all cogs.\n" 48 | " Useful when setting up the bot in a new venv and requirements are missing.\n" 49 | " " 50 | msgstr "" 51 | 52 | -------------------------------------------------------------------------------- /.utils/locales/sv-SE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2022-04-22 20:47\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Swedish\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: sv-SE\n" 16 | "X-Crowdin-File: /dpy-2.0/.utils/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 422\n" 18 | "Language: sv_SE\n" 19 | 20 | #: .utils/utils.py:173 21 | #, docstring 22 | msgid "Utilities for Cog creation!" 23 | msgstr "" 24 | 25 | #: .utils/utils.py:179 26 | #, docstring 27 | msgid "Ensure all info.json files are up-to-date with current standards" 28 | msgstr "" 29 | 30 | #: .utils/utils.py:299 31 | #, docstring 32 | msgid "Generate a new info.json file for your new cog!" 33 | msgstr "" 34 | 35 | #: .utils/utils.py:339 .utils/utils.py:389 36 | #, docstring 37 | msgid "Count the number of lines of .py files in all folders" 38 | msgstr "" 39 | 40 | #: .utils/utils.py:426 41 | #, docstring 42 | msgid "Generate README.md from info about all cogs" 43 | msgstr "" 44 | 45 | #: .utils/utils.py:472 46 | #, docstring 47 | msgid "Generate a requirements.txt for all cogs.\n" 48 | " Useful when setting up the bot in a new venv and requirements are missing.\n" 49 | " " 50 | msgstr "" 51 | 52 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017-present TrustyJAID 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PYTHON ?= python3 2 | 3 | # Python Code Style 4 | reformat: 5 | $(PYTHON) -m isort . 6 | $(PYTHON) -m black . 7 | stylecheck: 8 | $(PYTHON) -m isort --check . 9 | $(PYTHON) -m black --check . 10 | stylediff: 11 | $(PYTHON) -m isort --check --diff . 12 | $(PYTHON) -m black --check --diff . 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/README.md -------------------------------------------------------------------------------- /addimage/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .addimage import AddImage 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | n = AddImage(bot) 12 | await n.initialize() 13 | await bot.add_cog(n) 14 | -------------------------------------------------------------------------------- /addimage/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Add image for the bot to directly upload similar to alias.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog stores attachements uploaded by users for the purposes of creating custom commands to send uploaded attachments.\nUsers may delete their own data with or without making a data request.", 8 | "hidden": false, 9 | "install_msg": "This cog will create folders to save and delete images added locally. `[p]addimage` to add an image to the guild. Owner can add global bot images.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "AddImage", 18 | "permissions": [ 19 | "attach_files" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [], 23 | "short": "Add images for direct upload per guild and globally.", 24 | "tags": [], 25 | "type": "COG" 26 | } 27 | -------------------------------------------------------------------------------- /addimage/locales/messages.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: PACKAGE VERSION\n" 8 | "POT-Creation-Date: 2018-12-14 18:26-0700\n" 9 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 10 | "Last-Translator: FULL NAME \n" 11 | "Language-Team: LANGUAGE \n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "Generated-By: redgettext 2.1\n" 16 | 17 | 18 | #: addimage.py:21 19 | #, docstring 20 | msgid "" 21 | "\n" 22 | " Add images the bot can upload\n" 23 | " " 24 | msgstr "" 25 | 26 | #: addimage.py:56 27 | msgid "No prefix found." 28 | msgstr "" 29 | 30 | #: addimage.py:195 31 | msgid "__Author__: " 32 | msgstr "" 33 | 34 | #: addimage.py:197 35 | msgid "__Count__: " 36 | msgstr "" 37 | 38 | #: addimage.py:201 39 | msgid "Page " 40 | msgstr "" 41 | 42 | #: addimage.py:255 43 | #, docstring 44 | msgid "" 45 | "\n" 46 | " Add an image for the bot to directly upload\n" 47 | " " 48 | msgstr "" 49 | 50 | #: addimage.py:263 51 | #, docstring 52 | msgid "" 53 | "\n" 54 | " List images added to bot\n" 55 | " " 56 | msgstr "" 57 | 58 | #: addimage.py:277 59 | msgid "I does not have any images saved!" 60 | msgstr "" 61 | 62 | #: addimage.py:286 63 | #, docstring 64 | msgid "" 65 | "\n" 66 | " Clears the full set of images stored globally\n" 67 | " " 68 | msgstr "" 69 | 70 | #: addimage.py:294 71 | #, docstring 72 | msgid "" 73 | "\n" 74 | " Clear all the images stored for the current server\n" 75 | " " 76 | msgstr "" 77 | 78 | #: addimage.py:302 addimage.py:330 79 | #, docstring 80 | msgid "" 81 | "\n" 82 | " Remove a selected images\n" 83 | "\n" 84 | " `name` the command name used to post the image\n" 85 | " " 86 | msgstr "" 87 | 88 | #: addimage.py:312 89 | msgid " is not an image for this guild!" 90 | msgstr "" 91 | 92 | #: addimage.py:324 93 | msgid " has been deleted from this guild!" 94 | msgstr "" 95 | 96 | #: addimage.py:340 97 | msgid " is not a global image!" 98 | msgstr "" 99 | 100 | #: addimage.py:352 101 | msgid " has been deleted globally!" 102 | msgstr "" 103 | 104 | #: addimage.py:390 105 | msgid "Image adding timed out." 106 | msgstr "" 107 | 108 | #: addimage.py:393 109 | msgid "Image adding cancelled." 110 | msgstr "" 111 | 112 | #: addimage.py:401 113 | #, docstring 114 | msgid "" 115 | "\n" 116 | " Add an image to direct upload on this server\n" 117 | "\n" 118 | " `name` the command name used to post the image\n" 119 | " " 120 | msgstr "" 121 | 122 | #: addimage.py:410 addimage.py:443 123 | msgid "global is not a valid command name! Try something else." 124 | msgstr "" 125 | 126 | #: addimage.py:413 addimage.py:446 127 | msgid " is already in the list, try another!" 128 | msgstr "" 129 | 130 | #: addimage.py:416 addimage.py:449 131 | msgid " added as the command!" 132 | msgstr "" 133 | 134 | #: addimage.py:419 addimage.py:452 135 | msgid "Upload an image for me to use! Type `exit` to cancel." 136 | msgstr "" 137 | 138 | #: addimage.py:425 addimage.py:458 139 | msgid " has been added to my files!" 140 | msgstr "" 141 | 142 | #: addimage.py:433 143 | #, docstring 144 | msgid "" 145 | "\n" 146 | " Add an image to direct upload globally\n" 147 | "\n" 148 | " `name` the command name used to post the image\n" 149 | " " 150 | msgstr "" 151 | 152 | -------------------------------------------------------------------------------- /adventurealert/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .adventurealert import AdventureAlert 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | await bot.add_cog(AdventureAlert(bot)) 12 | -------------------------------------------------------------------------------- /adventurealert/abc.py: -------------------------------------------------------------------------------- 1 | from abc import ABC 2 | 3 | from redbot.core import Config 4 | from redbot.core.bot import Red 5 | 6 | 7 | class MixinMeta(ABC): 8 | """ 9 | Base class for well behaved type hint detection with composite class. 10 | 11 | Basically, to keep developers sane when not all attributes are defined in each mixin. 12 | 13 | This is modified from 14 | https://github.com/Cog-Creators/Red-DiscordBot/blob/V3/develop/redbot/cogs/mod/abc.py 15 | """ 16 | 17 | def __init__(self, *_args): 18 | self.bot: Red 19 | self.config: Config 20 | -------------------------------------------------------------------------------- /adventurealert/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Receive notifications from adventure activities!", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog stores discord User ID's for the purposes of mentioning the user on certain events.\nUsers may delete their own data with or without making a data request.", 8 | "hidden": false, 9 | "install_msg": "Make sure you're running the latest version of adventure from https://github.com/aikaterna/gobcog", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "AdventureAlert", 18 | "permissions": [], 19 | "required_cogs": { 20 | "adventure": "https://github.com/aikaterna/gobcog/" 21 | }, 22 | "requirements": [], 23 | "short": "Receive notifications from adventure activities!", 24 | "tags": [ 25 | "fun", 26 | "adventure" 27 | ], 28 | "type": "COG" 29 | } 30 | -------------------------------------------------------------------------------- /alignment/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .alignment import Alignments 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = Alignments(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /alignment/data/SourceSansPro-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/alignment/data/SourceSansPro-SemiBold.ttf -------------------------------------------------------------------------------- /alignment/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Generate an alignment chart from users!", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store data or metadata about users. This cog can store images uploaded by the user or provided for the purpose of generating alignment charts.", 8 | "hidden": false, 9 | "install_msg": "This cog contains a data folder with a single font and can download and store images for watermarks and icons for alignment charts.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Alignment", 18 | "permissions": [ 19 | "attach_files" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [ 23 | "pillow" 24 | ], 25 | "short": "Create an alignment chart!", 26 | "tags": [ 27 | "fun", 28 | "memes", 29 | "meme" 30 | ], 31 | "type": "COG" 32 | } 33 | -------------------------------------------------------------------------------- /apngfilter/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .apngfilter import APNGFilter 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = APNGFilter(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /apngfilter/apngfilter.py: -------------------------------------------------------------------------------- 1 | import io 2 | import re 3 | from typing import cast 4 | 5 | import aiohttp 6 | import discord 7 | from redbot.core import Config, checks, commands 8 | 9 | IS_LINK_REGEX = re.compile(r"(http(s?):)([/|.|\w|\s|-])*\.(?:png)") 10 | APNG_REGEX = re.compile(rb"fdAT") # credit to Soulrift for researh on this 11 | 12 | 13 | class APNGFilter(commands.Cog): 14 | """Filter those pesky APNG images""" 15 | 16 | __author__ = ["TrustyJAID", "Sinbad", "Soulrift"] 17 | __version__ = "1.0.1" 18 | 19 | def __init__(self, bot): 20 | self.bot = bot 21 | default = {"enabled": False} 22 | self.config = Config.get_conf(self, 435457347654) 23 | self.config.register_guild(**default) 24 | 25 | def format_help_for_context(self, ctx: commands.Context) -> str: 26 | """ 27 | Thanks Sinbad! 28 | """ 29 | pre_processed = super().format_help_for_context(ctx) 30 | return f"{pre_processed}\n\nCog Version: {self.__version__}" 31 | 32 | async def red_delete_data_for_user(self, **kwargs): 33 | """ 34 | Nothing to delete 35 | """ 36 | return 37 | 38 | @commands.command() 39 | @checks.mod_or_permissions(manage_messages=True) 40 | @commands.bot_has_permissions(manage_messages=True) 41 | async def apngfilter(self, ctx: commands.Context) -> None: 42 | """ 43 | Toggle APNG filters on the server 44 | """ 45 | if await self.config.guild(ctx.guild).enabled(): 46 | await self.config.guild(ctx.guild).enabled.set(False) 47 | msg = "Disabled" 48 | else: 49 | await self.config.guild(ctx.guild).enabled.set(True) 50 | msg = "Enabled" 51 | await ctx.send("APNG Filter " + msg) 52 | 53 | @commands.Cog.listener() 54 | async def on_message(self, message: discord.Message) -> None: 55 | if not message.guild: 56 | return 57 | if not await self.config.guild(message.guild).enabled(): 58 | return 59 | channel = cast(discord.TextChannel, message.channel) 60 | if not channel.permissions_for(channel.guild.me).manage_messages: 61 | return 62 | is_link = IS_LINK_REGEX.findall(message.content) 63 | 64 | autoimmune = getattr(self.bot, "is_automod_immune", None) 65 | if autoimmune and await autoimmune(message): 66 | return 67 | 68 | for attachment in message.attachments: 69 | if attachment.filename.split(".")[-1] not in ("apng", "png"): 70 | continue # discord attempts to render by file extension, not mime type 71 | # keeps requests on the bot's session, prventing a unauthenticated ratelimit for attachments 72 | temp = io.BytesIO() 73 | await attachment.save(temp) 74 | temp.seek(0) 75 | # https://stackoverflow.com/questions/4525152/can-i-programmatically-determine-if-a-png-is-animated 76 | if APNG_REGEX.search(temp.getvalue()): 77 | await message.delete() 78 | break 79 | if is_link: 80 | for files in IS_LINK_REGEX.finditer(message.content): 81 | async with aiohttp.ClientSession() as session: 82 | async with session.get(files.group()) as file: 83 | temp = io.BytesIO() 84 | data = await file.read() 85 | temp.write(data) 86 | temp.seek(0) 87 | if APNG_REGEX.search(temp.getvalue()): 88 | await message.delete() 89 | -------------------------------------------------------------------------------- /apngfilter/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID", 4 | "Sinbad", 5 | "Soulrift" 6 | ], 7 | "description": "Automatically filter animated PNG's.", 8 | "disabled": false, 9 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 10 | "hidden": false, 11 | "install_msg": "Do `[p]apngfilter` to toggle servers automatically deleting APNG files.", 12 | "max_bot_version": "0.0.0", 13 | "min_bot_version": "3.5.0", 14 | "min_python_version": [ 15 | 3, 16 | 7, 17 | 2 18 | ], 19 | "name": "APNGFilter", 20 | "permissions": [ 21 | "manage_messages" 22 | ], 23 | "required_cogs": {}, 24 | "requirements": [], 25 | "short": "Automatically filter animated PNG's.", 26 | "tags": [ 27 | "utility" 28 | ], 29 | "type": "COG" 30 | } 31 | -------------------------------------------------------------------------------- /apngfilter/locales/fr-FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:09\n" 6 | "Last-Translator: \n" 7 | "Language-Team: French\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: fr\n" 16 | "X-Crowdin-File: /dpy-2.0/apngfilter/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 614\n" 18 | "Language: fr_FR\n" 19 | 20 | #: apngfilter/apngfilter.py:42 21 | #, docstring 22 | msgid "\n" 23 | " Toggle APNG filters on the server\n" 24 | " " 25 | msgstr "" 26 | 27 | -------------------------------------------------------------------------------- /apngfilter/locales/sv-SE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:10\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Swedish\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: sv-SE\n" 16 | "X-Crowdin-File: /dpy-2.0/apngfilter/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 614\n" 18 | "Language: sv_SE\n" 19 | 20 | #: apngfilter/apngfilter.py:42 21 | #, docstring 22 | msgid "\n" 23 | " Toggle APNG filters on the server\n" 24 | " " 25 | msgstr "" 26 | 27 | -------------------------------------------------------------------------------- /automod/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .automod import AutoMod 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = AutoMod(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /automod/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "A cog to interact with Discord Automod.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store end user data.", 8 | "hidden": false, 9 | "install_msg": "See `[p]automod` for available commands.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 9, 15 | 0 16 | ], 17 | "name": "Automod", 18 | "permissions": [], 19 | "required_cogs": {}, 20 | "requirements": [], 21 | "short": "Discord Automod", 22 | "tags": [ 23 | "automod", 24 | "moderation", 25 | "mod" 26 | ], 27 | "type": "COG" 28 | } 29 | -------------------------------------------------------------------------------- /badges/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .badges import Badges 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = Badges(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /badges/badge_entry.py: -------------------------------------------------------------------------------- 1 | class Badge: 2 | def __init__( 3 | self, 4 | badge_name: str, 5 | code: str, 6 | image: str = None, 7 | watermark: str = None, 8 | file_name: str = None, 9 | is_inverted: bool = False, 10 | ): 11 | super().__init__() 12 | self.badge_name = badge_name 13 | self.code = code 14 | self.file_name = file_name 15 | self.is_inverted = is_inverted 16 | self.image = image 17 | self.watermark = watermark 18 | 19 | def to_json(self) -> dict: 20 | return { 21 | "badge_name": self.badge_name, 22 | "code": self.code, 23 | "image": self.image, 24 | "watermark": self.watermark, 25 | "file_name": self.file_name, 26 | "is_inverted": self.is_inverted, 27 | } 28 | 29 | @classmethod 30 | async def from_json(cls, data: dict): 31 | badge_name = data["badge_name"] 32 | code = data["code"] 33 | is_inverted = data["is_inverted"] 34 | if "file_name" in data: 35 | file_name = data["file_name"] 36 | else: 37 | file_name = None 38 | 39 | if "image" in data: 40 | image = data["image"] 41 | else: 42 | image = None 43 | if "watermark" in data: 44 | watermark = data["watermark"] 45 | else: 46 | watermark = None 47 | return cls(badge_name, code, image, watermark, file_name, is_inverted) 48 | -------------------------------------------------------------------------------- /badges/data/arial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/badges/data/arial.ttf -------------------------------------------------------------------------------- /badges/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Create your own badge with your discord info.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 8 | "hidden": false, 9 | "install_msg": "This cog comes with a bundled data folder containing fonts. Type `[p]badges` to see what badges are available!", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Badges", 18 | "permissions": [ 19 | "attach_files" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [ 23 | "pillow" 24 | ], 25 | "short": "Create your own badge!", 26 | "tags": [], 27 | "type": "COG" 28 | } 29 | -------------------------------------------------------------------------------- /badges/locales/fr-FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:09\n" 6 | "Last-Translator: \n" 7 | "Language-Team: French\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: fr\n" 16 | "X-Crowdin-File: /dpy-2.0/badges/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 476\n" 18 | "Language: fr_FR\n" 19 | 20 | #: badges/badges.py:25 21 | #, docstring 22 | msgid "\n" 23 | " Create fun fake badges based on your discord profile\n" 24 | " " 25 | msgstr "" 26 | 27 | #: badges/badges.py:96 badges/badges.py:103 28 | msgid "GENERAL SUPPORT" 29 | msgstr "" 30 | 31 | #: badges/badges.py:107 32 | msgid "ACTIVE" 33 | msgstr "" 34 | 35 | #: badges/badges.py:109 36 | msgid "COMPLETING TASK" 37 | msgstr "" 38 | 39 | #: badges/badges.py:111 40 | msgid "AWAITING INSTRUCTIONS" 41 | msgstr "" 42 | 43 | #: badges/badges.py:113 44 | msgid "MIA" 45 | msgstr "" 46 | 47 | #: badges/badges.py:151 48 | msgid "LEVEL " 49 | msgstr "" 50 | 51 | #: badges/badges.py:247 52 | #, docstring 53 | msgid "\n" 54 | " Creates a fun fake badge based on your discord profile\n\n" 55 | " `badge` is the name of the badges\n" 56 | " do `[p]listbadges` to see available badges\n" 57 | " " 58 | msgstr "" 59 | 60 | #: badges/badges.py:260 badges/badges.py:289 61 | msgid "`{}` is not an available badge." 62 | msgstr "" 63 | 64 | #: badges/badges.py:265 badges/badges.py:294 65 | msgid "Something went wrong sorry!" 66 | msgstr "" 67 | 68 | #: badges/badges.py:275 69 | #, docstring 70 | msgid "\n" 71 | " Creates a fun fake gif badge based on your discord profile\n" 72 | " this only works if you have a gif avatar\n\n" 73 | " `badge` is the name of the badges\n" 74 | " do `[p]listbadges` to see available badges\n" 75 | " " 76 | msgstr "" 77 | 78 | #: badges/badges.py:302 79 | #, docstring 80 | msgid "\n" 81 | " List the available badges that can be created\n" 82 | " " 83 | msgstr "" 84 | 85 | #: badges/badges.py:308 86 | msgid "__Global Badges__\n" 87 | msgstr "" 88 | 89 | -------------------------------------------------------------------------------- /badges/locales/messages.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: PACKAGE VERSION\n" 8 | "POT-Creation-Date: 2018-12-14 21:05-0700\n" 9 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 10 | "Last-Translator: FULL NAME \n" 11 | "Language-Team: LANGUAGE \n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "Generated-By: redgettext 2.1\n" 16 | 17 | 18 | #: badges.py:23 19 | #, docstring 20 | msgid "" 21 | "\n" 22 | " Create fun fake badges based on your discord profile\n" 23 | " " 24 | msgstr "" 25 | 26 | #: badges.py:75 badges.py:80 27 | msgid "GENERAL SUPPORT" 28 | msgstr "" 29 | 30 | #: badges.py:84 31 | msgid "ACTIVE" 32 | msgstr "" 33 | 34 | #: badges.py:86 35 | msgid "COMPLETING TASK" 36 | msgstr "" 37 | 38 | #: badges.py:88 39 | msgid "AWAITING INSTRUCTIONS" 40 | msgstr "" 41 | 42 | #: badges.py:90 43 | msgid "MIA" 44 | msgstr "" 45 | 46 | #: badges.py:130 47 | msgid "LEVEL " 48 | msgstr "" 49 | 50 | #: badges.py:229 51 | #, docstring 52 | msgid "" 53 | "\n" 54 | " Creates a fun fake badge based on your discord profile\n" 55 | "\n" 56 | " `badge` is the name of the badges\n" 57 | " do `[p]listbadges` to see available badges\n" 58 | " " 59 | msgstr "" 60 | 61 | #: badges.py:244 badges.py:267 62 | msgid "Something went wrong sorry!" 63 | msgstr "" 64 | 65 | #: badges.py:251 66 | #, docstring 67 | msgid "" 68 | "\n" 69 | " Creates a fun fake gif badge based on your discord profile\n" 70 | " this only works if you have a gif avatar\n" 71 | "\n" 72 | " `badge` is the name of the badges\n" 73 | " do `[p]listbadges` to see available badges\n" 74 | " " 75 | msgstr "" 76 | 77 | #: badges.py:275 78 | #, docstring 79 | msgid "" 80 | "\n" 81 | " List the available badges that can be created\n" 82 | " " 83 | msgstr "" 84 | 85 | #: badges.py:289 badges.py:292 86 | msgid "Global Badges" 87 | msgstr "" 88 | 89 | -------------------------------------------------------------------------------- /badges/locales/sv-SE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:10\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Swedish\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: sv-SE\n" 16 | "X-Crowdin-File: /dpy-2.0/badges/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 476\n" 18 | "Language: sv_SE\n" 19 | 20 | #: badges/badges.py:25 21 | #, docstring 22 | msgid "\n" 23 | " Create fun fake badges based on your discord profile\n" 24 | " " 25 | msgstr "" 26 | 27 | #: badges/badges.py:96 badges/badges.py:103 28 | msgid "GENERAL SUPPORT" 29 | msgstr "" 30 | 31 | #: badges/badges.py:107 32 | msgid "ACTIVE" 33 | msgstr "" 34 | 35 | #: badges/badges.py:109 36 | msgid "COMPLETING TASK" 37 | msgstr "" 38 | 39 | #: badges/badges.py:111 40 | msgid "AWAITING INSTRUCTIONS" 41 | msgstr "" 42 | 43 | #: badges/badges.py:113 44 | msgid "MIA" 45 | msgstr "" 46 | 47 | #: badges/badges.py:151 48 | msgid "LEVEL " 49 | msgstr "" 50 | 51 | #: badges/badges.py:247 52 | #, docstring 53 | msgid "\n" 54 | " Creates a fun fake badge based on your discord profile\n\n" 55 | " `badge` is the name of the badges\n" 56 | " do `[p]listbadges` to see available badges\n" 57 | " " 58 | msgstr "" 59 | 60 | #: badges/badges.py:260 badges/badges.py:289 61 | msgid "`{}` is not an available badge." 62 | msgstr "" 63 | 64 | #: badges/badges.py:265 badges/badges.py:294 65 | msgid "Something went wrong sorry!" 66 | msgstr "" 67 | 68 | #: badges/badges.py:275 69 | #, docstring 70 | msgid "\n" 71 | " Creates a fun fake gif badge based on your discord profile\n" 72 | " this only works if you have a gif avatar\n\n" 73 | " `badge` is the name of the badges\n" 74 | " do `[p]listbadges` to see available badges\n" 75 | " " 76 | msgstr "" 77 | 78 | #: badges/badges.py:302 79 | #, docstring 80 | msgid "\n" 81 | " List the available badges that can be created\n" 82 | " " 83 | msgstr "" 84 | 85 | #: badges/badges.py:308 86 | msgid "__Global Badges__\n" 87 | msgstr "" 88 | 89 | -------------------------------------------------------------------------------- /bingo/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .bingo import Bingo 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = Bingo(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /bingo/converter.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | from redbot.core import commands 4 | 5 | 6 | class Stamp: 7 | async def convert(self, ctx: commands.Context, argument: str) -> List[int]: 8 | if len(argument) > 2: 9 | raise commands.BadArgument("Your stamp must be 2 characters max.") 10 | y = int(argument[1]) - 1 11 | bingo = await ctx.cog.config.guild(ctx.guild).bingo() 12 | try: 13 | x = bingo.index(argument[0].upper()) 14 | except ValueError: 15 | raise commands.BadArgument( 16 | f"`{argument[0].upper()}` is not a valid letter in {bingo}." 17 | ) 18 | 19 | return [x, y] 20 | -------------------------------------------------------------------------------- /bingo/data/SourceSansPro-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/bingo/data/SourceSansPro-SemiBold.ttf -------------------------------------------------------------------------------- /bingo/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Generate a bingo card to play on your server!", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store data or metadata about users. This cog can store images uploaded by the user or provided for the purpose of generating bingo cards.", 8 | "hidden": false, 9 | "install_msg": "This cog contains a data folder with a single font and can download and store images for watermarks and icons on bingo cards.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Bingo", 18 | "permissions": [ 19 | "attach_files" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [ 23 | "pillow" 24 | ], 25 | "short": "Play Bingo!", 26 | "tags": [ 27 | "fun", 28 | "memes", 29 | "meme", 30 | "bingo" 31 | ], 32 | "type": "COG" 33 | } 34 | -------------------------------------------------------------------------------- /cah/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .core import CardsAgainstHumanity 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = CardsAgainstHumanity(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /cah/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID", 4 | "crhallberg", 5 | "Cards Against Humanity\u00ae" 6 | ], 7 | "description": "Play Cards Against Humanity\u00ae!", 8 | "disabled": false, 9 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 10 | "hidden": false, 11 | "install_msg": "This cog downloads and stores a font file and two template images when loaded. Cards Against Humanity\u00ae\ufe0f is licenced under https://creativecommons.org/licenses/by-nc-sa/4.0/ and has not endorsed this works.", 12 | "max_bot_version": "0.0.0", 13 | "min_bot_version": "3.5.0", 14 | "min_python_version": [ 15 | 3, 16 | 9, 17 | 0 18 | ], 19 | "name": "CAH", 20 | "permissions": [], 21 | "required_cogs": {}, 22 | "requirements": [ 23 | "pillow" 24 | ], 25 | "short": "Cards Against Humanity\u00ae", 26 | "tags": [ 27 | "cah", 28 | "cards against humanity", 29 | "fun", 30 | "game" 31 | ], 32 | "type": "COG" 33 | } 34 | -------------------------------------------------------------------------------- /citation/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .citation import Citation 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = Citation(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /citation/citations/Readme.md: -------------------------------------------------------------------------------- 1 | # "Papers Please" citation generator 2 | 3 | A python script to generate citation slips from "Papers Please" game as a PNG file. 4 | 5 | --- 6 | Usage: `./bin/citate "Protocol Violated.\nSleeping at work" "Penalty assessed - 5 credits"` - gives output like below. 7 | 8 | ![Image resulting from above command](example_citation.png) 9 | 10 | Use `./bin/citate --help` to get list of options. 11 | 12 | Live web version is [here](https://saphi.re/papers_please). 13 | 14 | --- 15 | On a system with the Nix package manager, this tool can be directly run with: 16 | `nix run gitlab:Saphire/citations -- "Using Nix." "That's nice - +1 Flake"` 17 | 18 | --- 19 | All python, typescript, html and css code in the project is licensed under `GNU AGPL-3.0`. 20 | -------------------------------------------------------------------------------- /citation/citations/__init__.py: -------------------------------------------------------------------------------- 1 | from . import defaults, enums, themes 2 | from .factory import Factory 3 | -------------------------------------------------------------------------------- /citation/citations/data/BMmini.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/citation/citations/data/BMmini.ttf -------------------------------------------------------------------------------- /citation/citations/data/Megan_Serif.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/citation/citations/data/Megan_Serif.ttf -------------------------------------------------------------------------------- /citation/citations/data/crescent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/citation/citations/data/crescent.png -------------------------------------------------------------------------------- /citation/citations/data/moa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/citation/citations/data/moa.png -------------------------------------------------------------------------------- /citation/citations/data/stamp_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/citation/citations/data/stamp_bg.png -------------------------------------------------------------------------------- /citation/citations/defaults.py: -------------------------------------------------------------------------------- 1 | import pkg_resources 2 | 3 | 4 | def _get_resource(file_name): 5 | return pkg_resources.resource_filename(__name__, f"data/{file_name}") 6 | 7 | 8 | width = 183 9 | height = 80 10 | multiplier = 2 # Original game is 2x, not 1x 11 | 12 | stamp_filename = _get_resource("moa.png") 13 | stamp_bg_filename = _get_resource("stamp_bg.png") 14 | 15 | main_font_file = _get_resource("BMmini.ttf") 16 | alt_font_file = _get_resource("Megan_Serif.ttf") 17 | 18 | penalty: str = "No penalty - warning issued" 19 | title: str = "M.O.A. Citation" 20 | 21 | barcode = [1, 1, 1, 2, 2] 22 | barcode_str: str = "1,1,1,2,2" 23 | 24 | theme = "pink" 25 | -------------------------------------------------------------------------------- /citation/citations/enums.py: -------------------------------------------------------------------------------- 1 | from enum import Enum 2 | 3 | 4 | class Align(Enum): 5 | LEFT = 1 6 | CENTER = 2 7 | RIGHT = 3 8 | 9 | 10 | class Section(Enum): 11 | TITLE = 1 12 | BODY = 2 13 | FOOTER = 3 14 | -------------------------------------------------------------------------------- /citation/citations/themes.py: -------------------------------------------------------------------------------- 1 | from typing import NamedTuple 2 | 3 | 4 | class Theme(NamedTuple): 5 | background: str 6 | foreground: str 7 | details: str 8 | 9 | def to_json(self): 10 | return list(self) 11 | 12 | 13 | named = { 14 | "pink": Theme("#f3d7e6", "#5a5559", "#bfa8a8"), 15 | "gold": Theme("#292929", "#C5B067", "#171717"), 16 | "gray": Theme("#cbe2f3", "#555758", "#a1afba"), 17 | "blue": Theme("#B5D3FF", "#54575c", "#88ade7"), 18 | } 19 | -------------------------------------------------------------------------------- /citation/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "Saphire", 4 | "TrustyJAID" 5 | ], 6 | "description": "Make your own Papers Please citation", 7 | "disabled": false, 8 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 9 | "hidden": false, 10 | "install_msg": "Thanks for installing! This cog may take up a lot of memory and cpu resources. See available commands with `[p]citation`.", 11 | "max_bot_version": "0.0.0", 12 | "min_bot_version": "3.5.0", 13 | "min_python_version": [ 14 | 3, 15 | 8, 16 | 0 17 | ], 18 | "name": "Citation", 19 | "permissions": [ 20 | "attach_files" 21 | ], 22 | "required_cogs": {}, 23 | "requirements": [ 24 | "pillow" 25 | ], 26 | "short": "Create your own PapersPlease citation!", 27 | "tags": [ 28 | "fun", 29 | "memes", 30 | "meme" 31 | ], 32 | "type": "COG" 33 | } 34 | -------------------------------------------------------------------------------- /cleverbot/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .cleverbot import Cleverbot 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = Cleverbot(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /cleverbot/errors.py: -------------------------------------------------------------------------------- 1 | class CleverbotError(Exception): 2 | pass 3 | 4 | 5 | class NoCredentials(CleverbotError): 6 | pass 7 | 8 | 9 | class InvalidCredentials(CleverbotError): 10 | pass 11 | 12 | 13 | class APIError(CleverbotError): 14 | pass 15 | 16 | 17 | class OutOfRequests(CleverbotError): 18 | pass 19 | -------------------------------------------------------------------------------- /cleverbot/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "Twentysix", 4 | "TrustyJAID" 5 | ], 6 | "description": "Have your bot respond with cleverbot responses. Supports tweaks to customize the responses!", 7 | "disabled": false, 8 | "end_user_data_statement": "This cog does not persistently store data or metadata about users. However, this cog does pass user data to an external API for the purposes of simulated conversation responses.", 9 | "hidden": false, 10 | "install_msg": "Needs to be setup with an API key first. See `[p]cleverbotset apikey` / `[p]cleverbotset ioapikey`\n[p]cleverbot ` to talk with cleverbot.\n`@Mention ` works too.\n`[p]cleverbotset toggle` toggles replies by mention.", 11 | "max_bot_version": "0.0.0", 12 | "min_bot_version": "3.5.0", 13 | "min_python_version": [ 14 | 3, 15 | 7, 16 | 2 17 | ], 18 | "name": "Cleverbot", 19 | "permissions": [], 20 | "required_cogs": {}, 21 | "requirements": [ 22 | "charset-normalizer" 23 | ], 24 | "short": "Talk with Cleverbot!", 25 | "tags": [ 26 | "cleverbot" 27 | ], 28 | "type": "COG" 29 | } 30 | -------------------------------------------------------------------------------- /compliment/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .compliment import Compliment 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | n = Compliment(bot) 12 | await bot.add_cog(n) 13 | -------------------------------------------------------------------------------- /compliment/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "Airen", 4 | "JennJenn", 5 | "TrustyJAID" 6 | ], 7 | "description": "Compliment people in a creative way", 8 | "disabled": false, 9 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 10 | "hidden": false, 11 | "install_msg": "Usage: `[p]compliment `", 12 | "max_bot_version": "0.0.0", 13 | "min_bot_version": "3.5.0", 14 | "min_python_version": [ 15 | 3, 16 | 7, 17 | 2 18 | ], 19 | "name": "Compliment", 20 | "permissions": [], 21 | "required_cogs": {}, 22 | "requirements": [], 23 | "short": "Compliment people in a creative way", 24 | "tags": [], 25 | "type": "COG" 26 | } 27 | -------------------------------------------------------------------------------- /conversions/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .conversions import Conversions 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | n = Conversions(bot) 12 | await bot.add_cog(n) 13 | -------------------------------------------------------------------------------- /conversions/errors.py: -------------------------------------------------------------------------------- 1 | class ConversionsError(Exception): 2 | """Base Error class for conversions cog.""" 3 | 4 | 5 | class CoinMarketCapError(ConversionsError): 6 | """Error class for coinmarketcap errors.""" 7 | -------------------------------------------------------------------------------- /conversions/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Conversions for currencies, crypto-currencies, and stocks.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 8 | "hidden": false, 9 | "install_msg": "Please see `[p]cryptoapi` for instructions on setting up the cryptocurrency commands.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Conversions", 18 | "permissions": [ 19 | "embed_links" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [], 23 | "short": "Conversions for currencies, crypto-currencies, and stocks.", 24 | "tags": [], 25 | "type": "COG" 26 | } 27 | -------------------------------------------------------------------------------- /crabrave/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .crabrave import CrabRave 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = CrabRave(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /crabrave/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "DankMemer Team", 4 | "TrustyJAID", 5 | "thisisjvgrace" 6 | ], 7 | "description": "Create your very own Crab Rave videos with custom text! This cog requires FFMPEG, moviepy (https://github.com/Zulko/moviepy), and imagemagick to work. This cog downloads a template video and font file which is then saved locally and generates crab rave videos from the template. Old videos are deleted after uploading. This cog may consume heavy resources rendering videos.", 8 | "disabled": false, 9 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 10 | "hidden": false, 11 | "install_msg": "This cog requires FFMPEG, moviepy (https://github.com/Zulko/moviepy), and imagemagick (Please read this for how to install imagemagick from source ) to work. This cog downloads a template video and font file which is then saved locally and generates crab rave videos from the template. Old videos are deleted after uploading. This cog may consume heavy resources rendering videos.", 12 | "max_bot_version": "0.0.0", 13 | "min_bot_version": "3.5.0", 14 | "min_python_version": [ 15 | 3, 16 | 8, 17 | 0 18 | ], 19 | "name": "CrabRave", 20 | "permissions": [ 21 | "attach_files" 22 | ], 23 | "required_cogs": {}, 24 | "requirements": [ 25 | "moviepy>=2.0.0", 26 | "yt-dlp" 27 | ], 28 | "short": "Make Crab rave videos, in discord!", 29 | "tags": [ 30 | "fun" 31 | ], 32 | "type": "COG" 33 | } 34 | -------------------------------------------------------------------------------- /crabrave/locales/fr-FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:09\n" 6 | "Last-Translator: \n" 7 | "Language-Team: French\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: fr\n" 16 | "X-Crowdin-File: /dpy-2.0/crabrave/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 464\n" 18 | "Language: fr_FR\n" 19 | 20 | #: crabrave/crabrave.py:95 21 | #, docstring 22 | msgid "Make crab rave videos\n\n" 23 | " There must be exactly 1 `,` to split the message\n" 24 | " " 25 | msgstr "" 26 | 27 | #: crabrave/crabrave.py:184 28 | #, docstring 29 | msgid "Make miku rave videos\n\n" 30 | " There must be exactly 1 `,` to split the message\n" 31 | " " 32 | msgstr "" 33 | 34 | -------------------------------------------------------------------------------- /crabrave/locales/sv-SE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:10\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Swedish\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: sv-SE\n" 16 | "X-Crowdin-File: /dpy-2.0/crabrave/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 464\n" 18 | "Language: sv_SE\n" 19 | 20 | #: crabrave/crabrave.py:95 21 | #, docstring 22 | msgid "Make crab rave videos\n\n" 23 | " There must be exactly 1 `,` to split the message\n" 24 | " " 25 | msgstr "" 26 | 27 | #: crabrave/crabrave.py:184 28 | #, docstring 29 | msgid "Make miku rave videos\n\n" 30 | " There must be exactly 1 `,` to split the message\n" 31 | " " 32 | msgstr "" 33 | 34 | -------------------------------------------------------------------------------- /crowdin.yml: -------------------------------------------------------------------------------- 1 | api_key_env: CROWDIN_API_KEY 2 | project_identifier_env: CROWDIN_PROJECT_ID 3 | base_path: . 4 | preserve_hierarchy: true 5 | files: 6 | - source: '*/locales/messages.pot' 7 | translation: /%original_path%/%locale%.po 8 | -------------------------------------------------------------------------------- /destiny/.gitignore: -------------------------------------------------------------------------------- 1 | samples/* 2 | manifest/* 3 | d1_manifest/* 4 | -------------------------------------------------------------------------------- /destiny/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .destiny import Destiny 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = Destiny(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /destiny/errors.py: -------------------------------------------------------------------------------- 1 | class Destiny2APIError(Exception): 2 | pass 3 | 4 | 5 | class ServersUnavailable(Destiny2APIError): 6 | pass 7 | 8 | 9 | class Destiny2InvalidParameters(Destiny2APIError): 10 | pass 11 | 12 | 13 | class Destiny2APICooldown(Destiny2APIError): 14 | pass 15 | 16 | 17 | class Destiny2RefreshTokenError(Destiny2APIError): 18 | pass 19 | 20 | 21 | class Destiny2MissingAPITokens(Destiny2APIError): 22 | pass 23 | 24 | 25 | class Destiny2MissingManifest(Destiny2APIError): 26 | pass 27 | -------------------------------------------------------------------------------- /destiny/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Show Information from the Destiny 2 API. Note: This cog requires downloading a ~160 MB manifest. You must acquire an API key from https://www.bungie.net/en/Application. Select **Create New App**. Choose **Confidential** OAuth client type. Select the scope you would like the bot to have access to. Set the redirect URL to https://localhost/. Users wishing to access commands after you have supplied the tokens will be asked to authorize their account on your app. Once they have approved it they will be granted access to use commands.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog stores User IDs linked to an external API token for the purposes of granting OAuth access and information about the external API for the user.", 8 | "hidden": false, 9 | "install_msg": "Use `[p]destiny` to see available commands. Note: This cog will download ~160 MB of data to more efficiently search for item names. You must acquire an API key from https://www.bungie.net/en/Application \n Select **Create New App** \n Choose **Confidential** OAuth client type \n Select the scope you would like the bot to have access to \n Set the redirect URL to https://localhost/. Users wishing to access commands after you have supplied the tokens will be asked to authorize their account on your app. Once they have approved it they will be granted access to use commands.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Destiny", 18 | "permissions": [ 19 | "embed_links" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [ 23 | "tabulate" 24 | ], 25 | "short": "Destiny 2 information", 26 | "tags": [ 27 | "destiny", 28 | "gaming", 29 | "games" 30 | ], 31 | "type": "COG" 32 | } 33 | -------------------------------------------------------------------------------- /elements/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .core import Elements 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = Elements(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /elements/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Get a plethora of information about elements on the periodic table.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 8 | "hidden": false, 9 | "install_msg": "Do `[p]element ` to see info about the element. do `[p]ptable` to get a menu of all elements on the periodic table. NOTE: The mendeleev package is not currently installable on windows.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Elements", 18 | "permissions": [ 19 | "embed_links" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [ 23 | "mendeleev" 24 | ], 25 | "short": "Periodic table of elements", 26 | "tags": [ 27 | "science", 28 | "elements" 29 | ], 30 | "type": "COG" 31 | } 32 | -------------------------------------------------------------------------------- /elements/locales/fr-FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-05-05 18:04+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:09\n" 6 | "Last-Translator: \n" 7 | "Language-Team: French\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: fr\n" 16 | "X-Crowdin-File: /dpy-2.0/elements/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 518\n" 18 | "Language: fr_FR\n" 19 | 20 | -------------------------------------------------------------------------------- /elements/locales/sv-SE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-05-05 18:04+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:10\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Swedish\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: sv-SE\n" 16 | "X-Crowdin-File: /dpy-2.0/elements/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 518\n" 18 | "Language: sv_SE\n" 19 | 20 | -------------------------------------------------------------------------------- /encoding/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .encoding import Encoding 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | n = Encoding(bot) 12 | await bot.add_cog(n) 13 | -------------------------------------------------------------------------------- /encoding/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Encode messages into various types of encoding. Encoding types include: DNA, binary, Caeser cipher, hex, base 64, character, and braille.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 8 | "hidden": false, 9 | "install_msg": "Do `[p]encode`, `[p]decode` or `[p]help hash` to see available commands.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Encoding", 18 | "permissions": [], 19 | "required_cogs": {}, 20 | "requirements": [], 21 | "short": "Encode messages into various types of encoding.", 22 | "tags": [ 23 | "encoding", 24 | "rot", 25 | "caeser cipher" 26 | ], 27 | "type": "COG" 28 | } 29 | -------------------------------------------------------------------------------- /eventposter/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .eventposter import EventPoster 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = EventPoster(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /eventposter/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Allow users to setup and host events to be approved by admins.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog stores User ID's for the purposes of tracking user created events.", 8 | "hidden": false, 9 | "install_msg": "Setup a channel with `[p]eventset channel` for announcements and an admin channel with `[p]eventset approvalchannel`. Then anyone can ask to make an event with `[p]event`", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 9, 15 | 0 16 | ], 17 | "name": "EventPoster", 18 | "permissions": [ 19 | "embed_links", 20 | "add_reactions" 21 | ], 22 | "required_cogs": {}, 23 | "requirements": [ 24 | "python-dateutil", 25 | "pytz" 26 | ], 27 | "short": "Admin approved announcments/events", 28 | "tags": [ 29 | "events" 30 | ], 31 | "type": "COG" 32 | } 33 | -------------------------------------------------------------------------------- /extendedmodlog/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .extendedmodlog import ExtendedModLog 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = ExtendedModLog(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /extendedmodlog/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "RePulsR", 4 | "TrustyJAID" 5 | ], 6 | "description": "Log changes within the server using extended modlogs, an extension of RedBot cores modlog.", 7 | "disabled": false, 8 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 9 | "hidden": false, 10 | "install_msg": "Thanks for installing. Use `[p]modlog` to see the available commands.", 11 | "max_bot_version": "0.0.0", 12 | "min_bot_version": "3.5.0", 13 | "min_python_version": [ 14 | 3, 15 | 7, 16 | 2 17 | ], 18 | "name": "ExtendedModLog", 19 | "permissions": [ 20 | "embed_links" 21 | ], 22 | "required_cogs": {}, 23 | "requirements": [], 24 | "short": "ExtendedModLog, track changes made in the server.", 25 | "tags": [ 26 | "mod", 27 | "logs", 28 | "modlogs" 29 | ], 30 | "type": "COG" 31 | } 32 | -------------------------------------------------------------------------------- /fenrir/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .fenrir import Fenrir 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | await bot.add_cog(Fenrir(bot)) 12 | -------------------------------------------------------------------------------- /fenrir/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Create reaction messages to kick or ban users! https://tenor.com/view/order66-gif-9116581", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 8 | "hidden": false, 9 | "install_msg": "Give users the option to ban or kick themselves via reactions. Works with Insult and Compliment cogs if installed.\n\n WARNING: This will trigger on any emojis reacted to the message to add more chaos so be cautious.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Fenrir", 18 | "permissions": [ 19 | "ban_members", 20 | "kick_members" 21 | ], 22 | "required_cogs": {}, 23 | "requirements": [], 24 | "short": "Give users the option to kick, ban, or insult themselves via reactions.", 25 | "tags": [], 26 | "type": "COG" 27 | } 28 | -------------------------------------------------------------------------------- /fenrir/locales/fr-FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:09\n" 6 | "Last-Translator: \n" 7 | "Language-Team: French\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: fr\n" 16 | "X-Crowdin-File: /dpy-2.0/fenrir/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 560\n" 18 | "Language: fr_FR\n" 19 | 20 | #: fenrir/fenrir.py:72 21 | #, docstring 22 | msgid "\n" 23 | " We're Moving on.\n" 24 | " " 25 | msgstr "\n" 26 | " Nous avançons.\n" 27 | " " 28 | 29 | #: fenrir/fenrir.py:83 30 | #, docstring 31 | msgid "Create a reaction emoji to kick users" 32 | msgstr "Créer un émoji de réaction pour expulser les utilisateurs" 33 | 34 | #: fenrir/fenrir.py:93 35 | #, docstring 36 | msgid "Replace all commands in the server with insults\n\n" 37 | " Run this command again to disable it.\n" 38 | " " 39 | msgstr "Remplacez toutes les commandes du serveur par des insultes\n\n" 40 | " Exécutez cette commande à nouveau pour la désactiver.\n" 41 | " " 42 | 43 | #: fenrir/fenrir.py:108 44 | #, docstring 45 | msgid "Replaces all commands for specific members with insults" 46 | msgstr "Remplace toutes les commandes pour des membres spécifiques par des insultes" 47 | 48 | #: fenrir/fenrir.py:140 49 | #, docstring 50 | msgid "\n" 51 | " Sets the mute role for fenrirmute to work\n\n" 52 | " if no role is provided it will disable the command\n" 53 | " " 54 | msgstr "\n" 55 | " Définit le rôle muet pour fenrirmute pour travailler\n\n" 56 | " si aucun rôle n'est fourni, il désactivera la commande\n" 57 | " " 58 | 59 | #: fenrir/fenrir.py:155 60 | #, docstring 61 | msgid "Create a reaction emoji to ban users" 62 | msgstr "Créer un emoji de réaction pour bannir les utilisateurs" 63 | 64 | #: fenrir/fenrir.py:165 65 | #, docstring 66 | msgid "Create a reaction emoji to mute users" 67 | msgstr "Créer un emoji de réaction pour rendre muet les utilisateurs" 68 | 69 | #: fenrir/fenrir.py:178 70 | #, docstring 71 | msgid "Create a reaction emoji to insult users" 72 | msgstr "Créer un emoji de réaction pour insulter les utilisateurs" 73 | 74 | -------------------------------------------------------------------------------- /fenrir/locales/sv-SE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:10\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Swedish\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: sv-SE\n" 16 | "X-Crowdin-File: /dpy-2.0/fenrir/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 560\n" 18 | "Language: sv_SE\n" 19 | 20 | #: fenrir/fenrir.py:72 21 | #, docstring 22 | msgid "\n" 23 | " We're Moving on.\n" 24 | " " 25 | msgstr "" 26 | 27 | #: fenrir/fenrir.py:83 28 | #, docstring 29 | msgid "Create a reaction emoji to kick users" 30 | msgstr "" 31 | 32 | #: fenrir/fenrir.py:93 33 | #, docstring 34 | msgid "Replace all commands in the server with insults\n\n" 35 | " Run this command again to disable it.\n" 36 | " " 37 | msgstr "" 38 | 39 | #: fenrir/fenrir.py:108 40 | #, docstring 41 | msgid "Replaces all commands for specific members with insults" 42 | msgstr "" 43 | 44 | #: fenrir/fenrir.py:140 45 | #, docstring 46 | msgid "\n" 47 | " Sets the mute role for fenrirmute to work\n\n" 48 | " if no role is provided it will disable the command\n" 49 | " " 50 | msgstr "" 51 | 52 | #: fenrir/fenrir.py:155 53 | #, docstring 54 | msgid "Create a reaction emoji to ban users" 55 | msgstr "" 56 | 57 | #: fenrir/fenrir.py:165 58 | #, docstring 59 | msgid "Create a reaction emoji to mute users" 60 | msgstr "" 61 | 62 | #: fenrir/fenrir.py:178 63 | #, docstring 64 | msgid "Create a reaction emoji to insult users" 65 | msgstr "" 66 | 67 | -------------------------------------------------------------------------------- /fun/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .fun import Fun 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | await bot.add_cog(Fun(bot)) 12 | -------------------------------------------------------------------------------- /fun/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "Appu", 4 | "TrustyJAID" 5 | ], 6 | "description": "All sorts of commands that users may find fun or useful", 7 | "disabled": false, 8 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 9 | "hidden": false, 10 | "install_msg": "Type `[p]help Fun` to see all the commands.", 11 | "max_bot_version": "0.0.0", 12 | "min_bot_version": "3.5.0", 13 | "min_python_version": [ 14 | 3, 15 | 7, 16 | 2 17 | ], 18 | "name": "Fun", 19 | "permissions": [ 20 | "add_reactions" 21 | ], 22 | "required_cogs": {}, 23 | "requirements": [], 24 | "short": "Various fun commands like react, textflip, and regional", 25 | "tags": [], 26 | "type": "COG" 27 | } 28 | -------------------------------------------------------------------------------- /fun/locales/fr-FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:09\n" 6 | "Last-Translator: \n" 7 | "Language-Team: French\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: fr\n" 16 | "X-Crowdin-File: /dpy-2.0/fun/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 620\n" 18 | "Language: fr_FR\n" 19 | 20 | #: fun/fun.py:85 21 | #, docstring 22 | msgid "Replaces all vowels in a word with a letter." 23 | msgstr "" 24 | 25 | #: fun/fun.py:93 26 | #, docstring 27 | msgid "Flip given text." 28 | msgstr "" 29 | 30 | #: fun/fun.py:101 31 | #, docstring 32 | msgid "Replace letters with regional indicator emojis." 33 | msgstr "" 34 | 35 | #: fun/fun.py:107 36 | #, docstring 37 | msgid "Add n spaces between each letter. Ex: `[p]space 2 thicc`." 38 | msgstr "" 39 | 40 | #: fun/fun.py:121 41 | #, docstring 42 | msgid "\n" 43 | " React 🅾🇴🇫 to a message.\n\n" 44 | " `[message]` Can be a message ID from the current channel, a jump URL,\n" 45 | " or a channel_id-message_id from shift + copying ID on the message.\n" 46 | " " 47 | msgstr "" 48 | 49 | #: fun/fun.py:148 50 | #, docstring 51 | msgid "\n" 52 | " Add letter(s) as reaction to previous message.\n\n" 53 | " `[message]` Can be a message ID from the current channel, a jump URL,\n" 54 | " or a channel_id-message_id from shift + copying ID on the message.\n" 55 | " " 56 | msgstr "" 57 | 58 | -------------------------------------------------------------------------------- /fun/locales/sv-SE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:10\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Swedish\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: sv-SE\n" 16 | "X-Crowdin-File: /dpy-2.0/fun/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 620\n" 18 | "Language: sv_SE\n" 19 | 20 | #: fun/fun.py:85 21 | #, docstring 22 | msgid "Replaces all vowels in a word with a letter." 23 | msgstr "" 24 | 25 | #: fun/fun.py:93 26 | #, docstring 27 | msgid "Flip given text." 28 | msgstr "" 29 | 30 | #: fun/fun.py:101 31 | #, docstring 32 | msgid "Replace letters with regional indicator emojis." 33 | msgstr "" 34 | 35 | #: fun/fun.py:107 36 | #, docstring 37 | msgid "Add n spaces between each letter. Ex: `[p]space 2 thicc`." 38 | msgstr "" 39 | 40 | #: fun/fun.py:121 41 | #, docstring 42 | msgid "\n" 43 | " React 🅾🇴🇫 to a message.\n\n" 44 | " `[message]` Can be a message ID from the current channel, a jump URL,\n" 45 | " or a channel_id-message_id from shift + copying ID on the message.\n" 46 | " " 47 | msgstr "" 48 | 49 | #: fun/fun.py:148 50 | #, docstring 51 | msgid "\n" 52 | " Add letter(s) as reaction to previous message.\n\n" 53 | " `[message]` Can be a message ID from the current channel, a jump URL,\n" 54 | " or a channel_id-message_id from shift + copying ID on the message.\n" 55 | " " 56 | msgstr "" 57 | 58 | -------------------------------------------------------------------------------- /hockey/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .hockey import Hockey 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = Hockey(bot) 12 | await bot.add_cog(cog) 13 | # await cog.initialize() 14 | -------------------------------------------------------------------------------- /hockey/errors.py: -------------------------------------------------------------------------------- 1 | class HockeyError(Exception): 2 | pass 3 | 4 | 5 | class UserHasVotedError(HockeyError): 6 | pass 7 | 8 | 9 | class VotingHasEndedError(HockeyError): 10 | pass 11 | 12 | 13 | class NotAValidTeamError(HockeyError): 14 | pass 15 | 16 | 17 | class InvalidFileError(HockeyError): 18 | pass 19 | 20 | 21 | class NoSchedule(HockeyError): 22 | pass 23 | 24 | 25 | class NoStats(HockeyError): 26 | pass 27 | -------------------------------------------------------------------------------- /hockey/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "A cog to gather hockey scores, schedules, player data and more!", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog stores User ID's for the purposes of tracking votes in pickems.", 8 | "hidden": false, 9 | "install_msg": "Use `[p]hockey`, `[p]hockeyset` and `[p]gdc` to see what commands are available.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.3", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Hockey", 18 | "permissions": [ 19 | "embed_links", 20 | "manage_messages", 21 | "manage_channels" 22 | ], 23 | "required_cogs": {}, 24 | "requirements": [ 25 | "pytz", 26 | "tabulate" 27 | ], 28 | "short": "Hockey commands", 29 | "tags": [ 30 | "hockey", 31 | "nhl" 32 | ], 33 | "type": "COG" 34 | } 35 | -------------------------------------------------------------------------------- /hockey/teamentry.py: -------------------------------------------------------------------------------- 1 | class TeamEntry: 2 | def __init__( 3 | self, 4 | game_state: int, 5 | team_name: str, 6 | period: int, 7 | channel: list, 8 | goal_id: dict, 9 | created_channel: list, 10 | game_start: str, 11 | game_id: int, 12 | ): 13 | super().__init__() 14 | self.game_state = game_state 15 | self.team_name = team_name 16 | self.period = period 17 | self.channel = channel 18 | self.goal_id = goal_id 19 | self.created_channel = created_channel 20 | self.game_start = game_start 21 | self.game_id = game_id 22 | 23 | def to_json(self) -> dict: 24 | return { 25 | "team_name": self.team_name, 26 | "game_state": self.game_state, 27 | "channel": self.channel, 28 | "period": self.period, 29 | "created_channel": self.created_channel, 30 | "game_start": self.game_start, 31 | "goal_id": self.goal_id, 32 | "game_id": self.game_id, 33 | } 34 | 35 | @classmethod 36 | def from_json(cls, data: dict): 37 | return cls( 38 | data["team_name"], 39 | data["game_state"], 40 | data["game_start"], 41 | data["channel"], 42 | data["period"], 43 | data["goal_id"], 44 | data["created_channel"], 45 | data.get("game_id", 0), 46 | ) 47 | -------------------------------------------------------------------------------- /hue/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .hue import Hue 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | await bot.add_cog(Hue(bot)) 12 | -------------------------------------------------------------------------------- /hue/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Lets you control your philips hue lights with redbot.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 8 | "hidden": false, 9 | "install_msg": "Type `[p]hue` to see available commands.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Hue", 18 | "permissions": [], 19 | "required_cogs": {}, 20 | "requirements": [], 21 | "short": "Control your philips hue lights with redbot!", 22 | "tags": [], 23 | "type": "COG" 24 | } 25 | -------------------------------------------------------------------------------- /imagemaker/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .imagemaker import ImageMaker 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = ImageMaker(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /imagemaker/data/impact.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/impact.ttf -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_00.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_02.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_03.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_05.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_06.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_07.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_08.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_09.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_11.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_12.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_14.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_15.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_16.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_17.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_18.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_21.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_22.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_24.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_25.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_26.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_28.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_29.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_30.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_32.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_33.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_35.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_37.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_38.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_39.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_41.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_42.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_43.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_44.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_45.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_46.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_46.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_47.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_48.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_49.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_49.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_50.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_51.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_51.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_52.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_52.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_54.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_54.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_55.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_57.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_59.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_59.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_60.png -------------------------------------------------------------------------------- /imagemaker/data/trump_template/Trump_62.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/imagemaker/data/trump_template/Trump_62.png -------------------------------------------------------------------------------- /imagemaker/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID", 4 | "Ivan Seidel (isnowillegal.com)", 5 | "Bruno Lemos (isnowillegal.com)", 6 | "Jo\u00e3o Pedro (isnowillegal.com)" 7 | ], 8 | "description": "Show how you really feel. Make someone beautiful. Make something illegal.", 9 | "disabled": false, 10 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 11 | "hidden": false, 12 | "install_msg": "This cog contains a data folder with a single font and files to create your own `isnowillegal` image. Type `[p]help ImageMaker` to see available commands.", 13 | "max_bot_version": "0.0.0", 14 | "min_bot_version": "3.5.0", 15 | "min_python_version": [ 16 | 3, 17 | 8, 18 | 0 19 | ], 20 | "name": "Imagemaker", 21 | "permissions": [ 22 | "attach_files" 23 | ], 24 | "required_cogs": {}, 25 | "requirements": [ 26 | "pillow", 27 | "opencv-python", 28 | "numpy", 29 | "unidecode" 30 | ], 31 | "short": "Create your own feels!", 32 | "tags": [ 33 | "fun", 34 | "memes", 35 | "meme" 36 | ], 37 | "type": "COG" 38 | } 39 | -------------------------------------------------------------------------------- /imagemaker/locales/fr-FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:09\n" 6 | "Last-Translator: \n" 7 | "Language-Team: French\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: fr\n" 16 | "X-Crowdin-File: /dpy-2.0/imagemaker/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 506\n" 18 | "Language: fr_FR\n" 19 | 20 | #: imagemaker/imagemaker.py:109 21 | #, docstring 22 | msgid "\n" 23 | " Generate a wheeze image with text or a user avatar\n\n" 24 | " `text` the text or user avatar who will be placed in the bottom pane\n" 25 | " " 26 | msgstr "" 27 | 28 | #: imagemaker/imagemaker.py:127 29 | #, docstring 30 | msgid "\n" 31 | " Generate a gif of two images fading into eachother\n" 32 | " " 33 | msgstr "" 34 | 35 | #: imagemaker/imagemaker.py:147 36 | #, docstring 37 | msgid "\n" 38 | " Generate a scrolling text gif banner\n" 39 | " " 40 | msgstr "" 41 | 42 | #: imagemaker/imagemaker.py:166 43 | #, docstring 44 | msgid "\n" 45 | " Synthesize video clips of Obama\n" 46 | " " 47 | msgstr "" 48 | 49 | #: imagemaker/imagemaker.py:207 50 | #, docstring 51 | msgid "\n" 52 | " Generate a gif wheeze image if user has a gif avatar\n\n" 53 | " `member` the member whos avatar will be pasted on the image\n" 54 | " defaults to author\n" 55 | " " 56 | msgstr "" 57 | 58 | #: imagemaker/imagemaker.py:227 59 | #, docstring 60 | msgid "\n" 61 | " Generate a beautiful image using users avatar\n\n" 62 | " `user` the user whos avatar will be places on the image\n" 63 | " `is_gif` True/False to create a gif if the user has a gif avatar\n" 64 | " " 65 | msgstr "" 66 | 67 | #: imagemaker/imagemaker.py:247 68 | #, docstring 69 | msgid "\n" 70 | " Generate a feels image using users avatar and role colour\n\n" 71 | " `user` the user whos avatar will be places on the image\n" 72 | " `is_gif` True/False to create a gif if the user has a gif avatar\n" 73 | " " 74 | msgstr "" 75 | 76 | #: imagemaker/imagemaker.py:266 77 | #, docstring 78 | msgid "\n" 79 | " Generate isnowillegal gif image\n\n" 80 | " `message` will be what is pasted on the gif\n" 81 | " " 82 | msgstr "" 83 | 84 | #: imagemaker/imagemaker.py:290 85 | #, docstring 86 | msgid "Generate a Red Pill" 87 | msgstr "" 88 | 89 | #: imagemaker/imagemaker.py:296 90 | #, docstring 91 | msgid "Generate a Blue Pill" 92 | msgstr "" 93 | 94 | #: imagemaker/imagemaker.py:302 95 | #, docstring 96 | msgid "Generate a Black Pill" 97 | msgstr "" 98 | 99 | #: imagemaker/imagemaker.py:308 100 | #, docstring 101 | msgid "Generate a Purple Pill" 102 | msgstr "" 103 | 104 | #: imagemaker/imagemaker.py:314 105 | #, docstring 106 | msgid "Generate a Yellow Pill" 107 | msgstr "" 108 | 109 | #: imagemaker/imagemaker.py:320 110 | #, docstring 111 | msgid "Generate a Green Pill" 112 | msgstr "" 113 | 114 | #: imagemaker/imagemaker.py:342 115 | #, docstring 116 | msgid "\n" 117 | " Generate a pill image to any colour with hex codes\n\n" 118 | " `colour` is a hexcode colour\n" 119 | " " 120 | msgstr "" 121 | 122 | -------------------------------------------------------------------------------- /imagemaker/locales/sv-SE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:10\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Swedish\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: sv-SE\n" 16 | "X-Crowdin-File: /dpy-2.0/imagemaker/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 506\n" 18 | "Language: sv_SE\n" 19 | 20 | #: imagemaker/imagemaker.py:109 21 | #, docstring 22 | msgid "\n" 23 | " Generate a wheeze image with text or a user avatar\n\n" 24 | " `text` the text or user avatar who will be placed in the bottom pane\n" 25 | " " 26 | msgstr "" 27 | 28 | #: imagemaker/imagemaker.py:127 29 | #, docstring 30 | msgid "\n" 31 | " Generate a gif of two images fading into eachother\n" 32 | " " 33 | msgstr "" 34 | 35 | #: imagemaker/imagemaker.py:147 36 | #, docstring 37 | msgid "\n" 38 | " Generate a scrolling text gif banner\n" 39 | " " 40 | msgstr "" 41 | 42 | #: imagemaker/imagemaker.py:166 43 | #, docstring 44 | msgid "\n" 45 | " Synthesize video clips of Obama\n" 46 | " " 47 | msgstr "" 48 | 49 | #: imagemaker/imagemaker.py:207 50 | #, docstring 51 | msgid "\n" 52 | " Generate a gif wheeze image if user has a gif avatar\n\n" 53 | " `member` the member whos avatar will be pasted on the image\n" 54 | " defaults to author\n" 55 | " " 56 | msgstr "" 57 | 58 | #: imagemaker/imagemaker.py:227 59 | #, docstring 60 | msgid "\n" 61 | " Generate a beautiful image using users avatar\n\n" 62 | " `user` the user whos avatar will be places on the image\n" 63 | " `is_gif` True/False to create a gif if the user has a gif avatar\n" 64 | " " 65 | msgstr "" 66 | 67 | #: imagemaker/imagemaker.py:247 68 | #, docstring 69 | msgid "\n" 70 | " Generate a feels image using users avatar and role colour\n\n" 71 | " `user` the user whos avatar will be places on the image\n" 72 | " `is_gif` True/False to create a gif if the user has a gif avatar\n" 73 | " " 74 | msgstr "" 75 | 76 | #: imagemaker/imagemaker.py:266 77 | #, docstring 78 | msgid "\n" 79 | " Generate isnowillegal gif image\n\n" 80 | " `message` will be what is pasted on the gif\n" 81 | " " 82 | msgstr "" 83 | 84 | #: imagemaker/imagemaker.py:290 85 | #, docstring 86 | msgid "Generate a Red Pill" 87 | msgstr "" 88 | 89 | #: imagemaker/imagemaker.py:296 90 | #, docstring 91 | msgid "Generate a Blue Pill" 92 | msgstr "" 93 | 94 | #: imagemaker/imagemaker.py:302 95 | #, docstring 96 | msgid "Generate a Black Pill" 97 | msgstr "" 98 | 99 | #: imagemaker/imagemaker.py:308 100 | #, docstring 101 | msgid "Generate a Purple Pill" 102 | msgstr "" 103 | 104 | #: imagemaker/imagemaker.py:314 105 | #, docstring 106 | msgid "Generate a Yellow Pill" 107 | msgstr "" 108 | 109 | #: imagemaker/imagemaker.py:320 110 | #, docstring 111 | msgid "Generate a Green Pill" 112 | msgstr "" 113 | 114 | #: imagemaker/imagemaker.py:342 115 | #, docstring 116 | msgid "\n" 117 | " Generate a pill image to any colour with hex codes\n\n" 118 | " `colour` is a hexcode colour\n" 119 | " " 120 | msgstr "" 121 | 122 | -------------------------------------------------------------------------------- /imgflip/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .imgflip import Imgflip 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | await bot.add_cog(Imgflip(bot)) 12 | -------------------------------------------------------------------------------- /imgflip/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "Twentysix", 4 | "TrustyJAID" 5 | ], 6 | "description": "Recreation of Red v1 meme generator", 7 | "disabled": false, 8 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 9 | "hidden": false, 10 | "install_msg": "Recreation of Red v1 meme generator cog!", 11 | "max_bot_version": "0.0.0", 12 | "min_bot_version": "3.5.0", 13 | "min_python_version": [ 14 | 3, 15 | 7, 16 | 2 17 | ], 18 | "name": "Imgflip", 19 | "permissions": [], 20 | "required_cogs": {}, 21 | "requirements": [], 22 | "short": "Recreation of Red v1 meme generator", 23 | "tags": [ 24 | "meme", 25 | "memes", 26 | "fun" 27 | ], 28 | "type": "COG" 29 | } 30 | -------------------------------------------------------------------------------- /imgflip/locales/fr-FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:09\n" 6 | "Last-Translator: \n" 7 | "Language-Team: French\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: fr\n" 16 | "X-Crowdin-File: /dpy-2.0/imgflip/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 458\n" 18 | "Language: fr_FR\n" 19 | 20 | #: imgflip/imgflip.py:111 21 | #, docstring 22 | msgid "List memes with names that can be used" 23 | msgstr "" 24 | 25 | #: imgflip/imgflip.py:129 26 | #, docstring 27 | msgid "Create custom memes from imgflip\n\n" 28 | " `meme_name` can be the name of the meme to use or the ID from imgflip\n" 29 | " `text` is lines of text separated by `|`\n" 30 | " Do `[p]getmemes` to see which meme names will work\n\n" 31 | " You can get meme ID's from https://imgflip.com/memetemplates\n" 32 | " click blank template and use the Template ID in place of meme_name\n" 33 | " " 34 | msgstr "" 35 | 36 | #: imgflip/imgflip.py:160 37 | #, docstring 38 | msgid "Command for setting required access information for the API" 39 | msgstr "" 40 | 41 | -------------------------------------------------------------------------------- /imgflip/locales/sv-SE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:10\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Swedish\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: sv-SE\n" 16 | "X-Crowdin-File: /dpy-2.0/imgflip/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 458\n" 18 | "Language: sv_SE\n" 19 | 20 | #: imgflip/imgflip.py:111 21 | #, docstring 22 | msgid "List memes with names that can be used" 23 | msgstr "" 24 | 25 | #: imgflip/imgflip.py:129 26 | #, docstring 27 | msgid "Create custom memes from imgflip\n\n" 28 | " `meme_name` can be the name of the meme to use or the ID from imgflip\n" 29 | " `text` is lines of text separated by `|`\n" 30 | " Do `[p]getmemes` to see which meme names will work\n\n" 31 | " You can get meme ID's from https://imgflip.com/memetemplates\n" 32 | " click blank template and use the Template ID in place of meme_name\n" 33 | " " 34 | msgstr "" 35 | 36 | #: imgflip/imgflip.py:160 37 | #, docstring 38 | msgid "Command for setting required access information for the API" 39 | msgstr "" 40 | 41 | -------------------------------------------------------------------------------- /info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "install_msg": "Thanks for checking out my cogs!\nFor issues, bugs, or suggestions contact me in the discord support server here: https://discord.gg/c6HQUb7\nFor more information on my cogs go to my github here: ", 6 | "name": "Trusty-cogs", 7 | "short": "Cogs by TrustyJAID inspired by many.", 8 | "description": "A plethora of potentially useful commands and functions for your bot. Create a starboard, trigger automatic responses, or even create your own fun badges.", 9 | "tags": [ 10 | "Fun", 11 | "Hockey", 12 | "Images", 13 | "Badges", 14 | "Utility", 15 | "Starboard", 16 | "Trigger" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /insult/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .insult import Insult 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | n = Insult(bot) 12 | await bot.add_cog(n) 13 | -------------------------------------------------------------------------------- /insult/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "Airen", 4 | "JennJenn", 5 | "TrustyJAID" 6 | ], 7 | "description": "Insult people in a creative way ![goteem](https://cdn.discordapp.com/emojis/350653489044652052.png?v=1)", 8 | "disabled": false, 9 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 10 | "hidden": false, 11 | "install_msg": "Usage: `[p]insult `", 12 | "max_bot_version": "0.0.0", 13 | "min_bot_version": "3.5.0", 14 | "min_python_version": [ 15 | 3, 16 | 7, 17 | 2 18 | ], 19 | "name": "Insult", 20 | "permissions": [], 21 | "required_cogs": {}, 22 | "requirements": [], 23 | "short": "Insult people in a creative way", 24 | "tags": [ 25 | "fun", 26 | "insults" 27 | ], 28 | "type": "COG" 29 | } 30 | -------------------------------------------------------------------------------- /inviteblocklist/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from redbot.core.bot import Red 5 | 6 | from .inviteblocklist import InviteBlocklist 7 | 8 | with open(Path(__file__).parent / "info.json") as fp: 9 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 10 | 11 | 12 | async def setup(bot: Red): 13 | cog = InviteBlocklist(bot) 14 | await bot.add_cog(cog) 15 | -------------------------------------------------------------------------------- /inviteblocklist/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Automatically delete discord invite links from specific guilds or allow only specified guild invites to be posted.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 8 | "hidden": false, 9 | "install_msg": "Thanks for installing.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 8, 15 | 0 16 | ], 17 | "name": "InviteBlocklist", 18 | "permissions": [ 19 | "embed_links" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [], 23 | "short": "Block or Allow invite links based on guild ID. Accepts invite links to extract guild ID's.", 24 | "tags": [], 25 | "type": "COG" 26 | } 27 | -------------------------------------------------------------------------------- /loaddev/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .loaddev import LoadDev 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = LoadDev(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /loaddev/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Allow for cores dev module to be loaded after bot startup. Also allows replacing `[p]mock` with another alternative.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 8 | "hidden": true, 9 | "install_msg": "This allows cores dev module to be loaded dynamically. Not recommended for production use.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "loaddev", 18 | "permissions": [], 19 | "required_cogs": {}, 20 | "requirements": [], 21 | "short": "Developer commands", 22 | "tags": [], 23 | "type": "COG" 24 | } 25 | -------------------------------------------------------------------------------- /loaddev/locales/fr-FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:09\n" 6 | "Last-Translator: \n" 7 | "Language-Team: French\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: fr\n" 16 | "X-Crowdin-File: /dpy-2.0/loaddev/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 572\n" 18 | "Language: fr_FR\n" 19 | 20 | #: loaddev/loaddev.py:64 21 | #, docstring 22 | msgid "\n" 23 | " Settings for automatically loading/unloading cores dev\n" 24 | " using this cog\n" 25 | " " 26 | msgstr "" 27 | 28 | #: loaddev/loaddev.py:71 29 | #, docstring 30 | msgid "\n" 31 | " Whether or not to automatically load dev when this cog is loaded.\n\n" 32 | " Note: This does not affect the CLI flag `--dev`\n" 33 | " " 34 | msgstr "" 35 | 36 | #: loaddev/loaddev.py:78 37 | msgid "I will automatically load dev when this cog is loaded." 38 | msgstr "" 39 | 40 | #: loaddev/loaddev.py:80 41 | msgid "I will not automatically load dev when this cog is loaded." 42 | msgstr "" 43 | 44 | #: loaddev/loaddev.py:84 45 | #, docstring 46 | msgid "\n" 47 | " Set an automatic replacement for `[p]mock` when auto loading dev.\n" 48 | " " 49 | msgstr "" 50 | 51 | #: loaddev/loaddev.py:90 52 | msgid "I will replace the `[p]mock` command with `[p]{replacement}`." 53 | msgstr "" 54 | 55 | #: loaddev/loaddev.py:95 56 | msgid "I will not replace the `[p]mock` command." 57 | msgstr "" 58 | 59 | #: loaddev/loaddev.py:100 60 | #, docstring 61 | msgid "\n" 62 | " Dynamically loads dev cog\n\n" 63 | " `[replace_mock]` the replacement command name for `[p]mock`\n" 64 | " If nothing is provided this will not replace `[p]mock`.\n" 65 | " " 66 | msgstr "" 67 | 68 | #: loaddev/loaddev.py:121 69 | msgid "The following package was loaded: `{pack}`" 70 | msgstr "" 71 | 72 | #: loaddev/loaddev.py:126 73 | #, docstring 74 | msgid "\n" 75 | " Unload Dev\n" 76 | " " 77 | msgstr "" 78 | 79 | #: loaddev/loaddev.py:130 80 | msgid "The following package was unloaded: `{pack}`" 81 | msgstr "" 82 | 83 | -------------------------------------------------------------------------------- /loaddev/locales/sv-SE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:10\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Swedish\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: sv-SE\n" 16 | "X-Crowdin-File: /dpy-2.0/loaddev/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 572\n" 18 | "Language: sv_SE\n" 19 | 20 | #: loaddev/loaddev.py:64 21 | #, docstring 22 | msgid "\n" 23 | " Settings for automatically loading/unloading cores dev\n" 24 | " using this cog\n" 25 | " " 26 | msgstr "" 27 | 28 | #: loaddev/loaddev.py:71 29 | #, docstring 30 | msgid "\n" 31 | " Whether or not to automatically load dev when this cog is loaded.\n\n" 32 | " Note: This does not affect the CLI flag `--dev`\n" 33 | " " 34 | msgstr "" 35 | 36 | #: loaddev/loaddev.py:78 37 | msgid "I will automatically load dev when this cog is loaded." 38 | msgstr "" 39 | 40 | #: loaddev/loaddev.py:80 41 | msgid "I will not automatically load dev when this cog is loaded." 42 | msgstr "" 43 | 44 | #: loaddev/loaddev.py:84 45 | #, docstring 46 | msgid "\n" 47 | " Set an automatic replacement for `[p]mock` when auto loading dev.\n" 48 | " " 49 | msgstr "" 50 | 51 | #: loaddev/loaddev.py:90 52 | msgid "I will replace the `[p]mock` command with `[p]{replacement}`." 53 | msgstr "" 54 | 55 | #: loaddev/loaddev.py:95 56 | msgid "I will not replace the `[p]mock` command." 57 | msgstr "" 58 | 59 | #: loaddev/loaddev.py:100 60 | #, docstring 61 | msgid "\n" 62 | " Dynamically loads dev cog\n\n" 63 | " `[replace_mock]` the replacement command name for `[p]mock`\n" 64 | " If nothing is provided this will not replace `[p]mock`.\n" 65 | " " 66 | msgstr "" 67 | 68 | #: loaddev/loaddev.py:121 69 | msgid "The following package was loaded: `{pack}`" 70 | msgstr "" 71 | 72 | #: loaddev/loaddev.py:126 73 | #, docstring 74 | msgid "\n" 75 | " Unload Dev\n" 76 | " " 77 | msgstr "" 78 | 79 | #: loaddev/loaddev.py:130 80 | msgid "The following package was unloaded: `{pack}`" 81 | msgstr "" 82 | 83 | -------------------------------------------------------------------------------- /mentionprefix/__init__.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import json 3 | from pathlib import Path 4 | 5 | from .mentionprefix import MentionPrefix 6 | 7 | with open(Path(__file__).parent / "info.json") as fp: 8 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 9 | 10 | 11 | async def setup(bot): 12 | cog = MentionPrefix(bot) 13 | await bot.add_cog(cog) 14 | asyncio.create_task(cog.initialize()) 15 | -------------------------------------------------------------------------------- /mentionprefix/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "Draper", 4 | "TrustyJAID" 5 | ], 6 | "description": "This cog allows ping the bot to see the prefixes available.", 7 | "disabled": false, 8 | "end_user_data_statement": "This cog allows ping the bot to see the prefixes available.", 9 | "hidden": false, 10 | "install_msg": "This cog allows ping the bot to see the prefixes available.", 11 | "max_bot_version": "0.0.0", 12 | "min_bot_version": "3.5.0", 13 | "min_python_version": [ 14 | 3, 15 | 8, 16 | 1 17 | ], 18 | "name": "MentionPrefix", 19 | "permissions": [], 20 | "required_cogs": {}, 21 | "requirements": [], 22 | "short": "This cog allows ping the bot to see the prefixes available.", 23 | "tags": [ 24 | "help" 25 | ], 26 | "type": "COG" 27 | } 28 | -------------------------------------------------------------------------------- /mentionprefix/locales/fr-FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:09\n" 6 | "Last-Translator: \n" 7 | "Language-Team: French\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: fr\n" 16 | "X-Crowdin-File: /dpy-2.0/mentionprefix/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 590\n" 18 | "Language: fr_FR\n" 19 | 20 | #: mentionprefix/mentionprefix.py:61 21 | #, docstring 22 | msgid "Toggle whether mentioning the bot will send a help message." 23 | msgstr "" 24 | 25 | #: mentionprefix/mentionprefix.py:64 26 | msgid "Mentioning the bot will trigger it to send a help message." 27 | msgstr "" 28 | 29 | #: mentionprefix/mentionprefix.py:67 30 | msgid "Mentioning the bot will no longer cause it to send a help message." 31 | msgstr "" 32 | 33 | #: mentionprefix/mentionprefix.py:125 34 | msgid "my prefix here is" 35 | msgstr "" 36 | 37 | #: mentionprefix/mentionprefix.py:125 38 | msgid "my prefixes here are" 39 | msgstr "" 40 | 41 | #: mentionprefix/mentionprefix.py:131 mentionprefix/mentionprefix.py:149 42 | msgid "Hey there, {verb} the following:\n" 43 | "{p_list}" 44 | msgstr "" 45 | 46 | #: mentionprefix/mentionprefix.py:137 47 | msgid "Hey there, {verb} the following:\n" 48 | "{p_list}\n" 49 | "Why don't you try `{p}{command}` to see everything I can do." 50 | msgstr "" 51 | 52 | -------------------------------------------------------------------------------- /mentionprefix/locales/sv-SE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:10\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Swedish\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: sv-SE\n" 16 | "X-Crowdin-File: /dpy-2.0/mentionprefix/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 590\n" 18 | "Language: sv_SE\n" 19 | 20 | #: mentionprefix/mentionprefix.py:61 21 | #, docstring 22 | msgid "Toggle whether mentioning the bot will send a help message." 23 | msgstr "" 24 | 25 | #: mentionprefix/mentionprefix.py:64 26 | msgid "Mentioning the bot will trigger it to send a help message." 27 | msgstr "" 28 | 29 | #: mentionprefix/mentionprefix.py:67 30 | msgid "Mentioning the bot will no longer cause it to send a help message." 31 | msgstr "" 32 | 33 | #: mentionprefix/mentionprefix.py:125 34 | msgid "my prefix here is" 35 | msgstr "" 36 | 37 | #: mentionprefix/mentionprefix.py:125 38 | msgid "my prefixes here are" 39 | msgstr "" 40 | 41 | #: mentionprefix/mentionprefix.py:131 mentionprefix/mentionprefix.py:149 42 | msgid "Hey there, {verb} the following:\n" 43 | "{p_list}" 44 | msgstr "" 45 | 46 | #: mentionprefix/mentionprefix.py:137 47 | msgid "Hey there, {verb} the following:\n" 48 | "{p_list}\n" 49 | "Why don't you try `{p}{command}` to see everything I can do." 50 | msgstr "" 51 | 52 | -------------------------------------------------------------------------------- /mock/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .mock import Mock 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | await bot.add_cog(Mock(bot)) 12 | -------------------------------------------------------------------------------- /mock/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Mock another user! If you need the core dev commands start the bot without the `--dev` flag and install the loaddev cog in my repo that allows you to replace `mock` with whatever you choose.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 8 | "hidden": false, 9 | "install_msg": "Type `[p]mock` to mock the last user to post. If you need the core dev commands start the bot without the `--dev` flag and install the dev cog in my repo allows you to replace `mock` with whatever you choose.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Mock", 18 | "permissions": [ 19 | "embed_links" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [], 23 | "short": "Mock another user!", 24 | "tags": [ 25 | "fun", 26 | "memes" 27 | ], 28 | "type": "COG" 29 | } 30 | -------------------------------------------------------------------------------- /mock/locales/fr-FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:09\n" 6 | "Last-Translator: \n" 7 | "Language-Team: French\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: fr\n" 16 | "X-Crowdin-File: /dpy-2.0/mock/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 584\n" 18 | "Language: fr_FR\n" 19 | 20 | #: mock/mock.py:50 21 | #, docstring 22 | msgid "\n" 23 | " Mock a user with the spongebob meme\n\n" 24 | " `[msg]` Optional either member, message ID, or string\n" 25 | " message ID can be channe_id-message-id formatted or a message link\n" 26 | " if no `msg` is provided the command will use the last message in channel before the command\n" 27 | " is `msg` is a member it will look through the past 10 messages in\n" 28 | " the `channel` and put them all together\n" 29 | " " 30 | msgstr "" 31 | 32 | -------------------------------------------------------------------------------- /mock/locales/sv-SE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:10\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Swedish\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: sv-SE\n" 16 | "X-Crowdin-File: /dpy-2.0/mock/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 584\n" 18 | "Language: sv_SE\n" 19 | 20 | #: mock/mock.py:50 21 | #, docstring 22 | msgid "\n" 23 | " Mock a user with the spongebob meme\n\n" 24 | " `[msg]` Optional either member, message ID, or string\n" 25 | " message ID can be channe_id-message-id formatted or a message link\n" 26 | " if no `msg` is provided the command will use the last message in channel before the command\n" 27 | " is `msg` is a member it will look through the past 10 messages in\n" 28 | " the `channel` and put them all together\n" 29 | " " 30 | msgstr "" 31 | 32 | -------------------------------------------------------------------------------- /nasa/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .core import NASACog 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = NASACog(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /nasa/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Get information from NASA's API", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 8 | "hidden": false, 9 | "install_msg": "See `[p]nasa` for all available commands.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "NASA", 18 | "permissions": [ 19 | "embed_links" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [ 23 | "skyfield" 24 | ], 25 | "short": "Cog for getting info from NASA's API", 26 | "tags": [ 27 | "NASA", 28 | "Space" 29 | ], 30 | "type": "COG" 31 | } 32 | -------------------------------------------------------------------------------- /notsobot/README.md: -------------------------------------------------------------------------------- 1 | # How to install the NotSoBot cog 2 | **Requirements for Python** 3 | ``` 4 | pip3 install python-aalib pyfiglet numpy pillow wand 5 | pip3 install git+https://github.com/Kareeeeem/jpglitch 6 | ``` 7 | **Note for Mac users: python-aalib uses ctypes to access aalib. As a result aalib is not available on Mac OS systems and will not import. You can still use everything except the ascii art commands.** 8 | 9 | 10 | **Requirements for ImageMagick** 11 | * https://imagemagick.org/script/download.php 12 | * http://docs.wand-py.org/en/0.6.4/guide/install.html 13 | 14 | ``` 15 | sudo apt -y install libncurses5-dev libbz2-dev libpng-dev libffi-dev libssl-dev liblzma-dev tk-dev libfreetype6-dev libdb5.3-dev libsqlite3-dev libncursesw5-dev libmagickwand-dev git libgdbm-dev imagemagick zlib1g-dev build-essential unzip libexpat1-dev libjpeg-dev ffmpeg libreadline6-dev webp libaa1-dev 16 | ``` 17 | 18 | Install the latest version of ImageMagick from source in Ubuntu/Debian based systems with: 19 | * https://linuxconfig.org/how-to-install-imagemagick-7-on-ubuntu-18-04-linux 20 | 21 | 22 | 23 | # If the above does not work here's how you can install from source on Ubuntu 24 | 25 | ```bash 26 | wget https://www.imagemagick.org/download/ImageMagick.tar.gz 27 | tar xvfz ImageMagick.tar.gz 28 | cd ImageMagick-* 29 | ./configure --disable-shared 30 | make -j "$(nproc)" 31 | sudo make install 32 | ``` 33 | 34 | ## Installing ImageMagick on Windows 35 | These instructions are specifically for installing ImageMagick for bots hosted on windows computers. 36 | 37 | 1. Go to [this link](https://imagemagick.org/script/download.php#windows) and click the first link on that page to begin downloading ImageMagick. 38 | 39 | 2. When the download finishes, run the downloaded file and click `accept` on the "License Agreement". 40 | 41 | 3. Click `next` on the "Information" screen. 42 | 43 | 4. The default install location should be something like `C:\Program Files\ImageMagick-6.9.11`. **Remember what it is set to.** It will be needed for a later step. You might want to copy it somewhere so you can remember it. When you are ready, click `next`. 44 | 45 | 5. Click `next` on the "Select Start Menu Folder" screen. 46 | 47 | 6. In the "Select Additional Tasks" screen, ensure that the following 3 options are checked: 48 | - Add application directory to your system path 49 | - Install FFmpeg 50 | - Install development headers and libraries for C and C++ 51 | then click `next`. 52 | 53 | 7. Click `install` to begin the installation. 54 | 55 | 8. When the installation finishes, click `next` and then `finish`. 56 | 57 | 9. Head to `\cogs\Downloader\lib\moviepy`, replacing `` with your bot's data path. Your data path can be found by running the command `[p]datapath`. 58 | 59 | 10. Shut down your bot. 60 | 61 | 11. Open the file `config_defaults.py`. 62 | 63 | 12. Replace the last line in that file `IMAGEMAGICK_BINARY = os.getenv('IMAGEMAGICK_BINARY', 'auto-detect')` with `IMAGEMAGICK_BINARY = r"\convert.exe"`, replacing `` with the install location from step 4. 64 | 65 | 13. Save and close the file. 66 | 67 | 14. Start up your bot. `[p]crabrave` should now be working. 68 | -------------------------------------------------------------------------------- /notsobot/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .notsobot import NotSoBot 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = NotSoBot(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /notsobot/data/Minecraftia.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/data/Minecraftia.ttf -------------------------------------------------------------------------------- /notsobot/data/arial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/data/arial.ttf -------------------------------------------------------------------------------- /notsobot/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "NotSoSuper", 4 | "TrustyJAID" 5 | ], 6 | "description": "Magick, trigger and manipulate images with many commands from NotSoSuper's NotSoBot. This cog has a lot of requirements, view the [cog README.md](https://github.com/TrustyJAID/Trusty-cogs/blob/master/notsobot/README.md) for details. ", 7 | "disabled": false, 8 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 9 | "hidden": false, 10 | "install_msg": "Please, read the README.md (https://github.com/TrustyJAID/Trusty-cogs/tree/master/notsobot) for instructions on how and what to install. `sudo apt-get install libmagickwand-dev libaa1-dev` and install all other requirements. Note some commands may be hidden if AALIB is not installed and AALIB will not work on Macs.", 11 | "max_bot_version": "0.0.0", 12 | "min_bot_version": "3.5.0", 13 | "min_python_version": [ 14 | 3, 15 | 7, 16 | 2 17 | ], 18 | "name": "NotSoBot", 19 | "permissions": [ 20 | "attach_files" 21 | ], 22 | "required_cogs": {}, 23 | "requirements": [ 24 | "pyfiglet", 25 | "numpy", 26 | "pillow", 27 | "git+https://github.com/Kareeeeem/jpglitch", 28 | "wand", 29 | "unidecode" 30 | ], 31 | "short": "Some working commands from NotSoBot", 32 | "tags": [ 33 | "fun", 34 | "memes", 35 | "images" 36 | ], 37 | "type": "COG" 38 | } 39 | -------------------------------------------------------------------------------- /notsobot/pixelsort/constants.py: -------------------------------------------------------------------------------- 1 | black_pixel = (0, 0, 0, 255) 2 | white_pixel = (255, 255, 255, 255) 3 | -------------------------------------------------------------------------------- /notsobot/pixelsort/sorter.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | 4 | def sort_image(pixels, intervals, randomness, s_func): 5 | sorted_pixels = [] 6 | for y in range(len(pixels)): 7 | row = [] 8 | x_min = 0 9 | for x_max in intervals[y]: 10 | interval = [] 11 | for x in range(x_min, x_max): 12 | interval.append(pixels[y][x]) 13 | if random.randint(0, 100) >= randomness: 14 | row += sort_interval(interval, s_func) 15 | else: 16 | row += interval 17 | x_min = x_max 18 | row.append(pixels[y][0]) 19 | sorted_pixels.append(row) 20 | return sorted_pixels 21 | 22 | 23 | def sort_interval(interval, sorting_function): 24 | return [] if interval == [] else sorted(interval, key=sorting_function) 25 | -------------------------------------------------------------------------------- /notsobot/pixelsort/sorting.py: -------------------------------------------------------------------------------- 1 | from . import util 2 | 3 | 4 | def lightness(pixel): 5 | return util.lightness(pixel) 6 | 7 | 8 | def intensity(pixel): 9 | return pixel[0] + pixel[1] + pixel[2] 10 | 11 | 12 | def maximum(pixel): 13 | return max(pixel[0], pixel[1], pixel[2]) 14 | 15 | 16 | def minimum(pixel): 17 | return min(pixel[0], pixel[1], pixel[2]) 18 | -------------------------------------------------------------------------------- /notsobot/pixelsort/util.py: -------------------------------------------------------------------------------- 1 | import random 2 | import string 3 | from colorsys import rgb_to_hsv 4 | 5 | 6 | def id_generator(size=5, chars=string.ascii_lowercase + string.ascii_uppercase + string.digits): 7 | return "".join(random.choice(chars) for _ in range(size)) 8 | 9 | 10 | def lightness(pixel): 11 | return ( 12 | rgb_to_hsv(pixel[0], pixel[1], pixel[2])[2] / 255.0 13 | ) # For backwards compatibility with python2 14 | 15 | 16 | def random_width(clength): 17 | x = random.random() 18 | width = int(clength * (1 - x)) 19 | return width 20 | 21 | 22 | def crop_to(image_to_crop, reference_image): 23 | """ 24 | Crops image to the size of a reference image. This function assumes that the relevant image is located in the center 25 | and you want to crop away equal sizes on both the left and right as well on both the top and bottom. 26 | :param image_to_crop 27 | :param reference_image 28 | :return: image cropped to the size of the reference image 29 | """ 30 | reference_size = reference_image.size 31 | current_size = image_to_crop.size 32 | dx = current_size[0] - reference_size[0] 33 | dy = current_size[1] - reference_size[1] 34 | left = dx / 2 35 | upper = dy / 2 36 | right = dx / 2 + reference_size[0] 37 | lower = dy / 2 + reference_size[1] 38 | return image_to_crop.crop(box=(left, upper, right, lower)) 39 | -------------------------------------------------------------------------------- /notsobot/vw/img/png/background/geometric.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/background/geometric.jpg -------------------------------------------------------------------------------- /notsobot/vw/img/png/bubbles/JavaUpdateAvailable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/bubbles/JavaUpdateAvailable.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/bubbles/Windows Connection with Little connectivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/bubbles/Windows Connection with Little connectivity.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/bubbles/a screaming comes across the sky.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/bubbles/a screaming comes across the sky.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/bubbles/faster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/bubbles/faster.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/bubbles/out of a fantasy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/bubbles/out of a fantasy.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/bubbles/pluggeddeviceintoaudiojack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/bubbles/pluggeddeviceintoaudiojack.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/bubbles/project a world.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/bubbles/project a world.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/bubbles/stupid_bubble_by_Baka_Sora_Club.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/bubbles/stupid_bubble_by_Baka_Sora_Club.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/greek/greek1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/greek/greek1.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/greek/greek2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/greek/greek2.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/greek/greek3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/greek/greek3.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/greek/greek4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/greek/greek4.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/greek/siddhartha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/greek/siddhartha.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/pics/ak47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/pics/ak47.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/pics/blindblake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/pics/blindblake.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/pics/dolphin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/pics/dolphin.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/pics/drip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/pics/drip.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/pics/fiji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/pics/fiji.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/pics/gun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/pics/gun.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/pics/knife.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/pics/knife.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/pics/knuckle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/pics/knuckle.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/98-problem.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/98-problem.jpg -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/9x-wu4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/9x-wu4.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/C2FAT32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/C2FAT32.gif -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/IPC_MPI_CP5611_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/IPC_MPI_CP5611_1.gif -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/Windows_98_-_Critical_Update_Notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/Windows_98_-_Critical_Update_Notification.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/au_15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/au_15.gif -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/au_16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/au_16.gif -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/au_20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/au_20.gif -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/create_disk_image.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/create_disk_image.gif -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/ht1338-alert-001-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/ht1338-alert-001-en.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/regedit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/regedit.gif -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/screenshot.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/sysinfo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/sysinfo.gif -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/update.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/update.gif -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/win98.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/win98.png -------------------------------------------------------------------------------- /notsobot/vw/img/png/windows/winnt31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/img/png/windows/winnt31.png -------------------------------------------------------------------------------- /notsobot/vw/resources/arial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustyJAID/Trusty-cogs/007aa3bf1d77372e78b0385193bc37cc631fb211/notsobot/vw/resources/arial.ttf -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.black] 2 | line-length = 99 3 | target-version = ['py38'] 4 | include = '\.py$' 5 | exclude = ''' 6 | /( 7 | \.eggs 8 | | \.git 9 | | \.hg 10 | | \.mypy_cache 11 | | \.tox 12 | | \.venv 13 | | _build 14 | | buck-out 15 | | build 16 | | dist 17 | | redbot\/vendored 18 | )/ 19 | ''' 20 | 21 | [tool.isort] 22 | profile = "black" 23 | 24 | [tool.pyright] 25 | reportImplicitStringConcatenation = false 26 | -------------------------------------------------------------------------------- /reddit/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .reddit import Reddit 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = Reddit(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /reddit/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Reddit commands for getting updates on specified subreddits.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 8 | "hidden": false, 9 | "install_msg": "Thanks for installing 1. Go to https://www.reddit.com/prefs/apps and select create another app...\n2. Give the app a name and description, specify that it's a script\n3. In the developed apps section under the apps name you provided before below `personal use script` copy that into `` Use `https://127.0.0.1` or `https://localhost` for the redirect url.\n4. In the app box where it says `secret` copy the code after into `` if you don't see this click the edit button\n5. Fill out the rest of the following command with your accounts username and password\nNOTE: If you have 2FA enabled on your account this will not work, I'd recommend creating a new reddit account specifically for the bot if that's the case.\n`[p]set api reddit username password client_id client_secret `", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Reddit", 18 | "permissions": [], 19 | "required_cogs": {}, 20 | "requirements": [ 21 | "reactivepy>=1.9.0.dev0", 22 | "git+https://github.com/TrustyJAID/aPRAW@setup-fix" 23 | ], 24 | "short": "A cog to post updates from reddit.", 25 | "tags": [ 26 | "reddit", 27 | "news" 28 | ], 29 | "type": "COG" 30 | } 31 | -------------------------------------------------------------------------------- /rekt/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .rekt import Rekt 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | await bot.add_cog(Rekt(bot)) 12 | -------------------------------------------------------------------------------- /rekt/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Are you REKT?", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 8 | "hidden": false, 9 | "install_msg": "Are you REKT?", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Rekt", 18 | "permissions": [ 19 | "embed_links" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [], 23 | "short": "Get REKT", 24 | "tags": [ 25 | "rekt" 26 | ], 27 | "type": "COG" 28 | } 29 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | charset-normalizer 2 | git+https://github.com/Kareeeeem/jpglitch 3 | git+https://github.com/TrustyJAID/aPRAW@setup-fix 4 | httpx>=0.15,<0.25 5 | matplotlib 6 | mendeleev 7 | moviepy>=2.0.0 8 | numpy 9 | opencv-python 10 | pillow 11 | pyfiglet 12 | python-dateutil 13 | pytz 14 | rapidfuzz 15 | reactivepy>=1.9.0.dev0 16 | skyfield 17 | tabulate 18 | tekore 19 | tweepy[async]>=4.10.0 20 | unidecode 21 | wand 22 | yt-dlp 23 | -------------------------------------------------------------------------------- /retrigger/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .retrigger import ReTrigger 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = ReTrigger(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /retrigger/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Trigger events based on regex! Check out and for help setting up the cog. Note: This cog can become quite resource heavy. Optional features are available if the requirements are present such as pillow for image resizing and pytesseract to scan images for text (OCR).", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog may store attachments and command information provided by Users for the purposes of performing actions.\nSome User ID's may be stored in the bots logging information.\nUsers may delete their own data with or without making a data request.", 8 | "hidden": false, 9 | "install_msg": "Add trigger responses to regex, see for help building regex expressions. This will create and save files/images locally for those triggers. To use resized images pillow must be installed although this is not a requirement for other triggers. For a simple guide on how to use the features of this cog check out https://github.com/TrustyJAID/Trusty-cogs/blob/master/retrigger/README.md. Note: This cog can become quite resource heavy.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "ReTrigger", 18 | "permissions": [ 19 | "embed_links" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [], 23 | "short": "Trigger events via Regular Expressions!", 24 | "tags": [ 25 | "trigger", 26 | "reactions" 27 | ], 28 | "type": "COG" 29 | } 30 | -------------------------------------------------------------------------------- /retrigger/message.py: -------------------------------------------------------------------------------- 1 | # Borrowed with permission from 2 | # https://github.com/mikeshardmind/SinbadCogs/blob/v3/scheduler/message.py 3 | 4 | from __future__ import annotations 5 | 6 | import re 7 | from typing import List, Union 8 | 9 | import discord 10 | 11 | EVERYONE_REGEX = re.compile(r"@here|@everyone") 12 | 13 | # This entire below block is such an awful hack. Don't look at it too closely. 14 | 15 | 16 | class ReTriggerMessage(discord.Message): 17 | """ 18 | Subclassed discord message with neutered coroutines. 19 | 20 | Extremely butchered class for a specific use case. 21 | Be careful when using this in other use cases. 22 | """ 23 | 24 | def __init__(self, *, message: discord.Message) -> None: 25 | # auto current time 26 | self.id = message.id 27 | # important properties for even being processed 28 | self.author = message.author 29 | self.channel = message.channel 30 | self.content = message.content 31 | self.guild = message.channel.guild # type: ignore 32 | self.reference = message.reference 33 | # this is required to fix an issue with cooldown commands 34 | self._edited_timestamp = message.created_at 35 | # this attribute being in almost everything (and needing to be) is a pain 36 | self._state = self.guild._state # type: ignore 37 | # sane values below, fresh messages which are commands should exhibit these. 38 | self.call = None 39 | self.type = discord.MessageType.default 40 | self.tts = False 41 | self.pinned = False 42 | # suport for attachments somehow later maybe? 43 | self.attachments: List[discord.Attachment] = message.attachments 44 | # support for embed search 45 | self.embeds = message.embeds 46 | # mentions 47 | self.mention_everyone = self.channel.permissions_for( 48 | self.author 49 | ).mention_everyone and bool(EVERYONE_REGEX.match(self.content)) 50 | # pylint: disable=E1133 51 | # pylint improperly detects the inherited properties here as not being iterable 52 | # This should be fixed with typehint support added to upstream lib later 53 | self.mentions: List[Union[discord.User, discord.Member]] = list( 54 | filter(None, [self.guild.get_member(idx) for idx in self.raw_mentions]) 55 | ) 56 | self.channel_mentions: List[discord.TextChannel] = list( 57 | filter( 58 | None, 59 | [self.guild.get_channel(idx) for idx in self.raw_channel_mentions], # type: ignore 60 | ) 61 | ) 62 | self.role_mentions: List[discord.Role] = list( 63 | filter(None, [self.guild.get_role(idx) for idx in self.raw_role_mentions]) 64 | ) 65 | self.webhook_id = None 66 | self.retrigger = True 67 | self.nonce = message.nonce 68 | self.poll = None 69 | -------------------------------------------------------------------------------- /roletools/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .roletools import RoleTools 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = RoleTools(bot) 12 | await bot.add_cog(cog) 13 | if not await cog.config.enable_slash(): 14 | bot.tree.remove_command("role-tools") 15 | -------------------------------------------------------------------------------- /roletools/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Various role utility commands. Including Reaction roles, Sticky roles, and Auto role.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog stores User ID's for the purposes of re-assigning roles when the user re-joins a server.\nUser ID's may be stored in the bots log information.", 8 | "hidden": false, 9 | "install_msg": "The command group is `[p]roletools`. Remember that role names are case sensitive.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 0, 15 | 0 16 | ], 17 | "name": "RoleTools", 18 | "permissions": [ 19 | "manage_roles" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [], 23 | "short": "Various role related tools.", 24 | "tags": [ 25 | "utility", 26 | "mod" 27 | ], 28 | "type": "COG" 29 | } 30 | -------------------------------------------------------------------------------- /runescape/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .runescape import Runescape 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | n = Runescape(bot) 12 | await bot.add_cog(n) 13 | -------------------------------------------------------------------------------- /runescape/helpers.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime, timedelta, timezone 2 | from typing import Optional 3 | 4 | __all__ = [ 5 | "RUNEDATE_EPOCH", 6 | "IMAGE_URL", 7 | "get_runedate", 8 | "name_to_image", 9 | "HEADERS", 10 | ] 11 | 12 | RUNEDATE_EPOCH = datetime(year=2002, month=2, day=27, hour=0, tzinfo=timezone.utc) 13 | 14 | IMAGE_URL = "https://runescape.wiki/w/Special:FilePath/" 15 | 16 | HEADERS = {"User-Agent": f"Red-DiscordBot Trusty-cogs Runescape Cog"} 17 | 18 | 19 | def get_runedate(date: Optional[datetime] = None) -> float: 20 | if date is None: 21 | date = datetime.now(timezone.utc) 22 | return (date - RUNEDATE_EPOCH).total_seconds() / (60 * 60 * 24) 23 | 24 | 25 | def runedate_to_datetime(runedate: float) -> datetime: 26 | seconds = runedate * 60 * 60 * 24 27 | return RUNEDATE_EPOCH + timedelta(seconds=seconds) 28 | 29 | 30 | def name_to_image(name: str) -> str: 31 | name = name.replace(" ", "_").replace("'", "") 32 | return f"{IMAGE_URL}{name}_detail.png" 33 | -------------------------------------------------------------------------------- /runescape/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "A cog to grab Runescape and OSRS stats and profile information.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog may store User ID's linked with an external API name for the purposes of simplifying command usage.\nUsers may clear this saved information at any time by command.", 8 | "hidden": false, 9 | "install_msg": "Thanks for installing.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 9, 15 | 0 16 | ], 17 | "name": "runescape", 18 | "permissions": [ 19 | "embed_links" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [ 23 | "tabulate", 24 | "pytz", 25 | "matplotlib" 26 | ], 27 | "short": "Show your Runescape stats in discord!", 28 | "tags": [ 29 | "runescape", 30 | "games", 31 | "osrs" 32 | ], 33 | "type": "COG" 34 | } 35 | -------------------------------------------------------------------------------- /runescape/rsrandom.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | 3 | __all__ = ["JavaRandom"] 4 | 5 | 6 | class JavaRandom: 7 | """ 8 | Java's Random() partially implemented in Python 9 | https://docs.oracle.com/javase/8/docs/api/java/util/Random.html 10 | """ 11 | 12 | def __init__(self, seed: int): 13 | self.set_seed(seed) 14 | 15 | def next(self, bits: int) -> int: 16 | self.seed = (self.seed * 0x5DEECE66D + 0xB) & ((1 << 48) - 1) 17 | return self._rshift(self.seed, (48 - bits)) 18 | 19 | def next_int(self, n: Optional[int]) -> int: 20 | if n is None: 21 | return self.next(32) 22 | if n <= 0: 23 | raise ValueError 24 | if (n & -n) == n: 25 | return n * self.next(31) >> 31 26 | bits = self.next(31) 27 | val = bits % n 28 | while bits - val + (n - 1) < 0: 29 | bits = self.next(31) 30 | val = bits % n 31 | return val 32 | 33 | def set_seed(self, seed: int): 34 | self.seed = (seed ^ 0x5DEECE66D) & ((1 << 48) - 1) 35 | return self.seed 36 | 37 | @staticmethod 38 | def _rshift(val: int, n: int) -> int: 39 | # print(f"{val=} {n=}") 40 | # https://stackoverflow.com/a/5833119 41 | n = val >> n 42 | # https://stackoverflow.com/a/37095855/4438492 43 | n = n & 0xFFFFFFFF 44 | return n | (-(n & 0x80000000)) 45 | -------------------------------------------------------------------------------- /runescape/wilderness.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime, timedelta 2 | from enum import Enum 3 | 4 | from .helpers import RUNEDATE_EPOCH 5 | 6 | 7 | class WildernessFlashEvents(Enum): 8 | spider_swarm = 0 9 | unnatural_outcrop = 1 10 | stryke_the_wyrm = 2 11 | demon_stragglers = 3 12 | butterfly_swarm = 4 13 | king_black_dragon_rampage = 5 14 | forgotten_soldiers = 6 15 | surprising_seedlings = 7 16 | hellhound_pack = 8 17 | infernal_star = 9 18 | lost_souls = 10 19 | ramokee_incursion = 11 20 | displaced_energy = 12 21 | evil_bloodwood_tree = 13 22 | 23 | def __str__(self): 24 | return self.name.replace("_", " ").title().replace("The", "the") 25 | 26 | def __len__(self): 27 | return len(WildernessFlashEvents) 28 | 29 | @property 30 | def special(self): 31 | return self in ( 32 | WildernessFlashEvents.stryke_the_wyrm, 33 | WildernessFlashEvents.king_black_dragon_rampage, 34 | WildernessFlashEvents.infernal_star, 35 | WildernessFlashEvents.evil_bloodwood_tree, 36 | ) 37 | 38 | def get_next(self, today: datetime) -> datetime: 39 | # represents the hours since the first spider swarm 40 | # we add 14 hours because the first spiderswarm in relation to the Runedate 41 | # is 14 hours after 42 | # this offset needs to be adjusted since the addition of the stryke the wyrm event 43 | hours_since = int((int((today - RUNEDATE_EPOCH).total_seconds()) / 3600)) + 14 44 | # the offset mapping how many hours until this even should be next 45 | offset = hours_since % len(self) 46 | # the number of hours until this event should be next 47 | hour = self.value - offset 48 | # Since the hour can be in the past and we don't care about the past 49 | # we add the total number of events. 50 | if hour < 0: 51 | hour += len(self) 52 | # add 1 hour because it's off by 1 hour 53 | next_event = today + timedelta(hours=hour + 1) 54 | return next_event 55 | -------------------------------------------------------------------------------- /serverstats/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .serverstats import ServerStats 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | await bot.add_cog(ServerStats(bot)) 12 | -------------------------------------------------------------------------------- /serverstats/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID", 4 | "Preda" 5 | ], 6 | "description": "A plethora of potentially useful commands for any bot owner. Includes a way to track the bot joining new servers, find cheaters on global economies, get user avatars and even larger emojis.", 7 | "disabled": false, 8 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 9 | "hidden": false, 10 | "install_msg": "Use `[p]setguildjoin` to set a channel to see all new servers the bot is added to and some information about them.", 11 | "max_bot_version": "0.0.0", 12 | "min_bot_version": "3.5.0", 13 | "min_python_version": [ 14 | 3, 15 | 7, 16 | 2 17 | ], 18 | "name": "ServerStats", 19 | "permissions": [ 20 | "read_message_history", 21 | "embed_links" 22 | ], 23 | "required_cogs": {}, 24 | "requirements": [ 25 | "unidecode", 26 | "pytz", 27 | "python-dateutil", 28 | "rapidfuzz" 29 | ], 30 | "short": "A plethora of potentially useful commands for any bot owner.", 31 | "tags": [ 32 | "stats" 33 | ], 34 | "type": "COG" 35 | } 36 | -------------------------------------------------------------------------------- /spotify/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .spotify import Spotify 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = Spotify(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /spotify/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID", 4 | "NeuroAssassin" 5 | ], 6 | "description": "This cog allows you to control Spotify via OAuth through the bot on discord. Use `[p]spotify` to see available commands.", 7 | "disabled": false, 8 | "end_user_data_statement": "This cog stores OAuth tokens and refresh tokens for the purposes of interacting with the Spotify API with discord commands and reactions. This data can be deleted at any time either via revoking the authorization token on Spotify or through the `[p]mydata forgetme` command.", 9 | "hidden": false, 10 | "install_msg": "See `[p]spotify` for available commands. `[p]spotify set creds` will explain how to setup your API key so you and others can use the cog.", 11 | "max_bot_version": "0.0.0", 12 | "min_bot_version": "3.5.0", 13 | "min_python_version": [ 14 | 3, 15 | 8, 16 | 0 17 | ], 18 | "name": "Spotify", 19 | "permissions": [], 20 | "required_cogs": {}, 21 | "requirements": [ 22 | "tekore", 23 | "tabulate", 24 | "httpx>=0.15,<0.25" 25 | ], 26 | "short": "Control Spotify through Discord!", 27 | "tags": [ 28 | "spotify" 29 | ], 30 | "type": "COG" 31 | } 32 | -------------------------------------------------------------------------------- /spotify/rpc.py: -------------------------------------------------------------------------------- 1 | from dashboard.rpc.utils import rpccheck 2 | from red_commons.logging import getLogger 3 | from redbot.core.bot import Red 4 | from redbot.core.commands import commands 5 | 6 | log = getLogger("red.trusty-cogs.spotify") 7 | 8 | 9 | class DashboardRPC_Spotify: 10 | def __init__(self, cog: commands.Cog): 11 | self.bot: Red = cog.bot 12 | self.cog: commands.Cog = cog 13 | 14 | self.bot.register_rpc_handler(self.authenticate_user) 15 | 16 | def unload(self): 17 | self.bot.unregister_rpc_handler(self.authenticate_user) 18 | 19 | @rpccheck() 20 | async def authenticate_user(self, user: int, code: str, state: str): 21 | if not self.bot.get_cog("Spotify"): 22 | return {"status": 0, "message": "Spotify cog is not loaded."} 23 | 24 | user = int(user) # Blame socket communication for this 25 | 26 | userobj = self.bot.get_user(user) 27 | if not userobj: 28 | return {"status": 0, "message": "Unknown user."} 29 | if not self.cog._credentials: 30 | return {"status": 0, "message": "Bot owner has not set credentials."} 31 | log.verbose("DashboardRPC_Spotify user: %s", user) 32 | try: 33 | auth = self.cog.temp_cache[userobj.id] 34 | except KeyError: 35 | return { 36 | "status": 0, 37 | "message": "You must authenticate using a link given by bot. If this fails try posting the full URL inside discord.", 38 | } 39 | 40 | user_token = await auth.request_token(code=code, state=state) 41 | await self.cog.save_token(userobj, user_token) 42 | 43 | del self.cog.temp_cache[userobj.id] 44 | self.cog.dashboard_authed.append(userobj.id) 45 | 46 | return {"status": 1} 47 | -------------------------------------------------------------------------------- /starboard/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .starboard import Starboard 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = Starboard(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /starboard/converters.py: -------------------------------------------------------------------------------- 1 | from typing import Union 2 | 3 | import discord 4 | from redbot.core import commands 5 | from redbot.core.i18n import Translator 6 | 7 | from .starboard_entry import StarboardEntry 8 | 9 | _ = Translator("Starboard", __file__) 10 | 11 | 12 | class StarboardExists(commands.Converter): 13 | async def convert(self, ctx: commands.Context, argument: str) -> StarboardEntry: 14 | cog = ctx.cog 15 | guild = ctx.guild 16 | if guild.id not in cog.starboards: 17 | raise commands.BadArgument(_("There are no starboards setup on this server!")) 18 | try: 19 | starboard = cog.starboards[guild.id][argument.lower()] 20 | except KeyError: 21 | raise commands.BadArgument( 22 | _("There is no starboard named {name}").format(name=argument) 23 | ) 24 | return starboard 25 | 26 | 27 | class RealEmoji(commands.EmojiConverter): 28 | async def convert(self, ctx: commands.Context, argument: str) -> Union[discord.Emoji, str]: 29 | try: 30 | emoji = await super().convert(ctx, argument) 31 | except commands.BadArgument: 32 | try: 33 | await ctx.message.add_reaction(argument) 34 | except discord.HTTPException: 35 | raise commands.EmojiNotFound(argument) 36 | else: 37 | emoji = argument 38 | return emoji 39 | -------------------------------------------------------------------------------- /starboard/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Create a starboard channel to save those amazing posts!", 6 | "disabled": false, 7 | "end_user_data_statement": "This stores message information from Users for the purposes of tracking reactions to the message.", 8 | "hidden": false, 9 | "install_msg": "Create a starboard!", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Starboard", 18 | "permissions": [ 19 | "embed_links" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [], 23 | "short": "Starboard", 24 | "tags": [ 25 | "starboard", 26 | "star" 27 | ], 28 | "type": "COG" 29 | } 30 | -------------------------------------------------------------------------------- /tarot/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .tarotreading import TarotReading 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | await bot.add_cog(TarotReading(bot)) 12 | -------------------------------------------------------------------------------- /tarot/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Find your tarot reading, your life reading, or pull a random tarot card!", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 8 | "hidden": false, 9 | "install_msg": "Usage: `[p]tarot life` `[p]tarot reading` `[p]tarot card`", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Tarot", 18 | "permissions": [ 19 | "embed_links" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [], 23 | "short": "General commands", 24 | "tags": [ 25 | "fun", 26 | "mystery" 27 | ], 28 | "type": "COG" 29 | } 30 | -------------------------------------------------------------------------------- /tarot/locales/fr-FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-30 21:00+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:09\n" 6 | "Last-Translator: \n" 7 | "Language-Team: French\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: fr\n" 16 | "X-Crowdin-File: /dpy-2.0/tarot/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 416\n" 18 | "Language: fr_FR\n" 19 | 20 | #: tarot/tarotreading.py:84 21 | #, docstring 22 | msgid "\n" 23 | " Unique reading based on your discord user ID. Doesn't change.\n\n" 24 | " `[user]` Optional user who you want to see a life tarot reading for.\n" 25 | " If no user is provided this will run for the user who is running the command.\n" 26 | " " 27 | msgstr "\n" 28 | " Lecture unique basée sur votre identifiant utilisateur Discord. Ne change pas.\n\n" 29 | " `[user]` Utilisateur facultatif pour qui vous voulez voir une lecture du tarot de vie.\n" 30 | " Si aucun utilisateur n'est fourni, cela sera exécuté pour l'utilisateur qui exécute la commande.\n" 31 | " " 32 | 33 | #: tarot/tarotreading.py:117 34 | #, docstring 35 | msgid "\n" 36 | " Unique reading as of this very moment.\n\n" 37 | " `[user]` Optional user you want to view a tarot reading for.\n" 38 | " If no user is provided this will run for the user who is running the command.\n" 39 | " " 40 | msgstr "\n" 41 | " Lecture unique dès ce moment précis.\n\n" 42 | " `[user]` Utilisateur facultatif pour lequel vous voulez voir une lecture de tarot.\n" 43 | " Si aucun utilisateur n'est fourni, cela sera exécuté pour l'utilisateur qui exécute la commande.\n" 44 | " " 45 | 46 | #: tarot/tarotreading.py:148 47 | #, docstring 48 | msgid "\n" 49 | " Random card or choose a card based on number or name.\n\n" 50 | " `[tarot_card]` Is the full name of any tarot card or a number corresponding to specific cards.\n" 51 | " If this doesn't match any cards number or name then a random one will be displayed instead.\n" 52 | " " 53 | msgstr "\n" 54 | " Carte aléatoire ou choisissez une carte en fonction du nombre ou du nom.\n\n" 55 | " `[tarot_card]` Est le nom complet de toute carte tarot ou un nombre correspondant à des cartes spécifiques.\n" 56 | " Si cela ne correspond à aucun numéro de carte ou nom alors un nom aléatoire sera affiché à la place.\n" 57 | " " 58 | 59 | -------------------------------------------------------------------------------- /tarot/locales/sv-SE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-30 21:00+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:10\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Swedish\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: sv-SE\n" 16 | "X-Crowdin-File: /dpy-2.0/tarot/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 416\n" 18 | "Language: sv_SE\n" 19 | 20 | #: tarot/tarotreading.py:84 21 | #, docstring 22 | msgid "\n" 23 | " Unique reading based on your discord user ID. Doesn't change.\n\n" 24 | " `[user]` Optional user who you want to see a life tarot reading for.\n" 25 | " If no user is provided this will run for the user who is running the command.\n" 26 | " " 27 | msgstr "" 28 | 29 | #: tarot/tarotreading.py:117 30 | #, docstring 31 | msgid "\n" 32 | " Unique reading as of this very moment.\n\n" 33 | " `[user]` Optional user you want to view a tarot reading for.\n" 34 | " If no user is provided this will run for the user who is running the command.\n" 35 | " " 36 | msgstr "" 37 | 38 | #: tarot/tarotreading.py:148 39 | #, docstring 40 | msgid "\n" 41 | " Random card or choose a card based on number or name.\n\n" 42 | " `[tarot_card]` Is the full name of any tarot card or a number corresponding to specific cards.\n" 43 | " If this doesn't match any cards number or name then a random one will be displayed instead.\n" 44 | " " 45 | msgstr "" 46 | 47 | -------------------------------------------------------------------------------- /timestamp/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .timestamp import Timestamp 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = Timestamp(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /timestamp/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "A cog to generate discord timestamps!", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog allows users to set a timezone for creating absolute timestamps at specific times based on their local time.", 8 | "hidden": false, 9 | "install_msg": "See `[p]timestamp` for available commands.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 9, 15 | 0 16 | ], 17 | "name": "Timestamp", 18 | "permissions": [], 19 | "required_cogs": {}, 20 | "requirements": [], 21 | "short": "Discord Timestamp Generator", 22 | "tags": [ 23 | "timestamp", 24 | "time", 25 | "timezone" 26 | ], 27 | "type": "COG" 28 | } 29 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [mypy] 2 | python_version = 3.8 3 | check_untyped_defs = True 4 | disallow_any_generics = True 5 | disallow_incomplete_defs = True 6 | disallow_subclassing_any = True 7 | disallow_untyped_calls = False 8 | 9 | # I wish that Red would have type hints for the command decorators :| 10 | # leaving this set to False for now 11 | disallow_untyped_decorators = False 12 | 13 | disallow_untyped_defs = True 14 | follow_imports = normal 15 | ignore_missing_imports = False 16 | implicit_reexport = False 17 | namespace_packages = True 18 | no_implicit_optional = True 19 | strict_equality = true 20 | warn_incomplete_stub = True 21 | warn_redundant_casts = True 22 | warn_return_any = True 23 | warn_unreachable = True 24 | warn_unused_configs = True 25 | warn_unused_ignores = True 26 | 27 | # Per-module options: 28 | 29 | [mypy-strictyaml.*] 30 | # gonna vendor discord stubs soon but for now let's ignore missing imports here 31 | ignore_missing_imports = False 32 | 33 | [flake8] 34 | max_line_length = 99 35 | 36 | [pylint] 37 | max_line_length = 99 38 | 39 | [pycodestyle] 40 | max_line_length = 99 41 | 42 | [isort] 43 | profile = "black" 44 | -------------------------------------------------------------------------------- /translate/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .translate import Translate 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = Translate(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /translate/converters.py: -------------------------------------------------------------------------------- 1 | import re 2 | from typing import Union 3 | 4 | import discord 5 | from discord.ext.commands.converter import IDConverter 6 | from discord.ext.commands.errors import BadArgument 7 | from redbot.core import commands 8 | from redbot.core.i18n import Translator 9 | 10 | _ = Translator("Translate", __file__) 11 | 12 | 13 | class ChannelUserRole(IDConverter): 14 | """ 15 | This will check to see if the provided argument is a channel, user, or role 16 | 17 | Guidance code on how to do this from: 18 | https://github.com/Rapptz/discord.py/blob/rewrite/discord/ext/commands/converter.py#L85 19 | https://github.com/Cog-Creators/Red-DiscordBot/blob/V3/develop/redbot/cogs/mod/mod.py#L24 20 | """ 21 | 22 | async def convert( 23 | self, ctx: commands.Context, argument: str 24 | ) -> Union[discord.TextChannel, discord.Role, discord.Member]: 25 | guild = ctx.guild 26 | result = None 27 | id_match = self._get_id_match(argument) 28 | channel_match = re.match(r"<#([0-9]+)>$", argument) 29 | member_match = re.match(r"<@!?([0-9]+)>$", argument) 30 | role_match = re.match(r"<@&([0-9]+)>$", argument) 31 | for converter in ["channel", "role", "member"]: 32 | if converter == "channel": 33 | match = id_match or channel_match 34 | if match: 35 | channel_id = match.group(1) 36 | result = guild.get_channel(int(channel_id)) 37 | else: 38 | result = discord.utils.get(guild.text_channels, name=argument) 39 | if converter == "member": 40 | match = id_match or member_match 41 | if match: 42 | member_id = match.group(1) 43 | result = guild.get_member(int(member_id)) 44 | else: 45 | result = guild.get_member_named(argument) 46 | if converter == "role": 47 | match = id_match or role_match 48 | if match: 49 | role_id = match.group(1) 50 | result = guild.get_role(int(role_id)) 51 | else: 52 | result = discord.utils.get(guild._roles.values(), name=argument) 53 | if result: 54 | break 55 | if not result: 56 | msg = _("{arg} is not a valid channel, user or role.").format(arg=argument) 57 | raise BadArgument(msg) 58 | return result 59 | -------------------------------------------------------------------------------- /translate/errors.py: -------------------------------------------------------------------------------- 1 | class GoogleTranslateAPIError(Exception): 2 | """Raised when google translate has an oopsie""" 3 | 4 | pass 5 | -------------------------------------------------------------------------------- /translate/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "Aziz", 4 | "TrustyJAID" 5 | ], 6 | "description": "Add flag emojis to messages to translate to that language or translate messages by command.", 7 | "disabled": false, 8 | "end_user_data_statement": "This cog does not persistently store data or metadata about users. However, this cog does pass user data to an external API for the purposes of analyzing and translating languages.", 9 | "hidden": false, 10 | "install_msg": "1. Go to Google Developers Console and log in with your Google account. (https://console.developers.google.com/)\n2. You should be prompted to create a new project (name does not matter).\n3. Click on Enable APIs and Services at the top.\n4. In the list of APIs choose or search for Cloud Translate API and click on it. Choose Enable.\n5. Click on Credentials on the left navigation bar.\n6. Click on Create Credential at the top.\n7. At the top click the link for \"API key\".\n8. No application restrictions are needed. Click Create at the bottom.\n9. You now have a key to add to `[p]translateset` Note: This cog may end up costing lots of money to use up to $20 per 1 million characters.", 11 | "max_bot_version": "0.0.0", 12 | "min_bot_version": "3.5.0", 13 | "min_python_version": [ 14 | 3, 15 | 7, 16 | 2 17 | ], 18 | "name": "Translate", 19 | "permissions": [], 20 | "required_cogs": {}, 21 | "requirements": [], 22 | "short": "Translate messages using google translate!", 23 | "tags": [ 24 | "utility", 25 | "translation" 26 | ], 27 | "type": "COG" 28 | } 29 | -------------------------------------------------------------------------------- /translate/locales/messages.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: PACKAGE VERSION\n" 8 | "POT-Creation-Date: 2019-02-09 00:37+0100\n" 9 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 10 | "Last-Translator: FULL NAME \n" 11 | "Language-Team: LANGUAGE \n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "Generated-By: redgettext 2.2\n" 16 | 17 | 18 | #: translate.py:62 19 | #, docstring 20 | msgid "" 21 | "\n" 22 | " Translate messages using google translate\n" 23 | " " 24 | msgstr "" 25 | 26 | #: translate.py:90 27 | msgid " said:" 28 | msgstr "" 29 | 30 | #: translate.py:91 31 | msgid " to " 32 | msgstr "" 33 | 34 | #: translate.py:91 35 | msgid "Requested by " 36 | msgstr "" 37 | 38 | #: translate.py:185 39 | msgid "said:" 40 | msgstr "" 41 | 42 | #: translate.py:305 43 | #, docstring 44 | msgid "" 45 | "\n" 46 | " Translate messages with google translate\n" 47 | "\n" 48 | " `to_language` is the language you would like to translate\n" 49 | " `message` is the message to translate\n" 50 | " " 51 | msgstr "" 52 | 53 | #: translate.py:313 54 | msgid "The bot owner needs to set an api key first!" 55 | msgstr "" 56 | 57 | #: translate.py:340 58 | #, docstring 59 | msgid "" 60 | "\n" 61 | " Toggle the bot auto translating\n" 62 | " " 63 | msgstr "" 64 | 65 | #: translate.py:349 66 | #, docstring 67 | msgid "" 68 | "\n" 69 | " Toggle translations to flag emoji reactions\n" 70 | " " 71 | msgstr "" 72 | 73 | #: translate.py:355 translate.py:372 74 | msgid "on" 75 | msgstr "" 76 | 77 | #: translate.py:357 translate.py:374 78 | msgid "off" 79 | msgstr "" 80 | 81 | #: translate.py:359 82 | msgid "Reaction translations have been turned " 83 | msgstr "" 84 | 85 | #: translate.py:366 86 | #, docstring 87 | msgid "" 88 | "\n" 89 | " Toggle translations with flag emojis in text\n" 90 | " " 91 | msgstr "" 92 | 93 | #: translate.py:376 94 | msgid "Flag emoji translations have been turned " 95 | msgstr "" 96 | 97 | #: translate.py:382 98 | #, docstring 99 | msgid "" 100 | "\n" 101 | " You must get an API key from google to set this up\n" 102 | "\n" 103 | " Note: Using this cog costs money, current rates are $20 per 1 million characters.\n" 104 | "\n" 105 | " 1. Go to Google Developers Console and log in with your Google account. \n" 106 | " (https://console.developers.google.com/)\n" 107 | " 2. You should be prompted to create a new project (name does not matter).\n" 108 | " 3. Click on Enable APIs and Services at the top.\n" 109 | " 4. In the list of APIs choose or search for Cloud Translate API and click on it. \n" 110 | " Choose Enable.\n" 111 | " 5. Click on Credentials on the left navigation bar.\n" 112 | " 6. Click on Create Credential at the top.\n" 113 | " 7. At the top click the link for \"API key\".\n" 114 | " 8. No application restrictions are needed. Click Create at the bottom.\n" 115 | " 9. You now have a key to add to `[p]translateset`\n" 116 | " " 117 | msgstr "" 118 | 119 | #: translate.py:400 120 | msgid "API key set." 121 | msgstr "" 122 | 123 | -------------------------------------------------------------------------------- /trusty-cogs.sublime-project: -------------------------------------------------------------------------------- 1 | {"folders": [{"path": "."}]} 2 | -------------------------------------------------------------------------------- /tweets/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .tweets import Tweets 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = Tweets(bot) 12 | await bot.add_cog(cog) 13 | -------------------------------------------------------------------------------- /tweets/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "palmtree5", 4 | "TrustyJAID" 5 | ], 6 | "description": "Gets the latest Tweet from twitter accounts and posts them in the specified channels", 7 | "disabled": false, 8 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 9 | "hidden": false, 10 | "install_msg": "`[p]tweets` to see commands and `[p]autotweet` to setup automatic twitter updates. Do `[p]tweetset creds` for how to set consumer key and secret and access token and secret. If you need these, visit https://apps.twitter.com/ and create an application, **You will need elevated access**. This plugin only needs read only permissions as it will only read public information.", 11 | "max_bot_version": "0.0.0", 12 | "min_bot_version": "3.5.0", 13 | "min_python_version": [ 14 | 3, 15 | 7, 16 | 2 17 | ], 18 | "name": "Tweets", 19 | "permissions": [ 20 | "embed_links" 21 | ], 22 | "required_cogs": {}, 23 | "requirements": [ 24 | "tweepy[async]>=4.10.0" 25 | ], 26 | "short": "Cog for getting info from Twitter", 27 | "tags": [ 28 | "twitter", 29 | "tweets" 30 | ], 31 | "type": "COG" 32 | } 33 | -------------------------------------------------------------------------------- /tweets/tweet_entry.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from dataclasses import dataclass 4 | from typing import Any, Dict, Union 5 | 6 | 7 | @dataclass 8 | class TweetEntry: 9 | def __init__(self, **kwargs): 10 | super().__init__() 11 | self.twitter_id = kwargs.get("twitter_id", 0) 12 | self.twitter_name = kwargs.get("twitter_name", "") 13 | self.channels = kwargs.get("channels", {}) 14 | self.last_tweet = kwargs.get("last_tweet", 0) 15 | 16 | def __repr__(self) -> str: 17 | return "".format(self) 18 | 19 | def to_json(self) -> Dict[str, Union[Dict[str, Union[bool, int]], int, str]]: 20 | return { 21 | "twitter_id": self.twitter_id, 22 | "twitter_name": self.twitter_name, 23 | "channels": {k: v.to_json() for k, v in self.channels.items()}, 24 | "last_tweet": self.last_tweet, 25 | } 26 | 27 | @classmethod 28 | def from_json(cls, data: Dict[str, Any]) -> TweetEntry: 29 | channel = data.get("channel", {}) 30 | channels = data.get("channels", {}) 31 | if isinstance(channel, list): 32 | for channel_id in data.get("channel", []): 33 | channels[str(channel_id)] = { 34 | "guild": None, 35 | "channel": channel_id, 36 | "replies": data.get("replies", False), 37 | "retweets": data.get("retweets", True), 38 | "embeds": True, 39 | } 40 | channel_obj = {} 41 | for channel_ids, chan_data in channels.items(): 42 | chan_data["channel"] = int(channel_ids) 43 | channel_obj[channel_ids] = ChannelData.from_json(chan_data) 44 | return cls( 45 | twitter_id=data.get("twitter_id"), 46 | twitter_name=data.get("twitter_name"), 47 | channels=channel_obj, 48 | last_tweet=data.get("last_tweet"), 49 | ) 50 | 51 | 52 | @dataclass 53 | class ChannelData: 54 | def __init__(self, **kwargs): 55 | self.guild = kwargs.get("guild") 56 | self.channel = kwargs.get("channel") 57 | self.replies = kwargs.get("replies", False) 58 | self.retweets = kwargs.get("retweets", True) 59 | self.embeds = kwargs.get("embeds", True) 60 | 61 | def __str__(self) -> str: 62 | return ( 63 | f"Replies: {self.replies} - ReTweets: {self.retweets} - Custom Embeds: {self.embeds}" 64 | ) 65 | 66 | def to_json(self) -> Dict[str, Any]: 67 | return { 68 | "guild": self.guild, 69 | "channel": self.channel, 70 | "replies": self.replies, 71 | "retweets": self.retweets, 72 | "embeds": self.embeds, 73 | } 74 | 75 | @classmethod 76 | def from_json(cls, data: Dict[str, Any]) -> ChannelData: 77 | return cls( 78 | guild=data.get("guild"), 79 | channel=data.get("channel"), 80 | replies=data.get("replies", False), 81 | retweets=data.get("retweets", True), 82 | embeds=data.get("embeds", True), 83 | ) 84 | -------------------------------------------------------------------------------- /twitch/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .twitch import Twitch 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | cog = Twitch(bot) 12 | await bot.add_cog(cog) 13 | await cog.initialize() 14 | -------------------------------------------------------------------------------- /twitch/errors.py: -------------------------------------------------------------------------------- 1 | class TwitchError(Exception): 2 | pass 3 | -------------------------------------------------------------------------------- /twitch/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Get notified of new twitch followers and get basic profile info.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog stores User ID's linked to an external API name for the purposes of tracking information from the external API.", 8 | "hidden": false, 9 | "install_msg": "Setup a channel for new twitch follower notifications!", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Twitch", 18 | "permissions": [ 19 | "embed_links" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [], 23 | "short": "Get basic twitch account information.", 24 | "tags": [ 25 | "twitch", 26 | "streaming", 27 | "utility" 28 | ], 29 | "type": "COG" 30 | } 31 | -------------------------------------------------------------------------------- /twitch/locales/fr-FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:09\n" 6 | "Last-Translator: \n" 7 | "Language-Team: French\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: fr\n" 16 | "X-Crowdin-File: /dpy-2.0/twitch/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 452\n" 18 | "Language: fr_FR\n" 19 | 20 | #: twitch/menus.py:229 twitch/menus.py:234 21 | msgid "You are not authorized to interact with this." 22 | msgstr "" 23 | 24 | #: twitch/twitch.py:110 25 | #, docstring 26 | msgid "Twitch related commands" 27 | msgstr "" 28 | 29 | #: twitch/twitch.py:118 30 | #, docstring 31 | msgid "\n" 32 | " Twitch Stream commands\n" 33 | " " 34 | msgstr "" 35 | 36 | #: twitch/twitch.py:125 37 | #, docstring 38 | msgid "\n" 39 | " Twitch Clips commands\n" 40 | " " 41 | msgstr "" 42 | 43 | #: twitch/twitch.py:139 44 | #, docstring 45 | msgid "\n" 46 | " Setup a channel for automatic follow notifications\n" 47 | " " 48 | msgstr "" 49 | 50 | #: twitch/twitch.py:191 51 | #, docstring 52 | msgid "\n" 53 | " Setup a channel for automatic clip notifications\n\n" 54 | " `` The name of the streamers whose clips you want posted\n" 55 | " `[channel]` The channel to post clips into, if not provided will use the current channel.\n" 56 | " `[view_count]` The minimum view count required before posting a clip.\n" 57 | " `[check_back]` How far back to look back for new clips. Note: You must provide a number\n" 58 | " for `view_count` when providing the check_back. Default is 8 days.\n" 59 | " " 60 | msgstr "" 61 | 62 | #: twitch/twitch.py:244 63 | #, docstring 64 | msgid "\n" 65 | " Remove an account from new clip notifications in the specified channel\n" 66 | " defaults to the current channel\n" 67 | " " 68 | msgstr "" 69 | 70 | #: twitch/twitch.py:291 71 | #, docstring 72 | msgid "\n" 73 | " Test channel for automatic follow notifications\n" 74 | " " 75 | msgstr "" 76 | 77 | #: twitch/twitch.py:323 78 | #, docstring 79 | msgid "\n" 80 | " Remove an account from follow notifications in the specified channel\n" 81 | " defaults to the current channel\n" 82 | " " 83 | msgstr "" 84 | 85 | #: twitch/twitch.py:364 86 | #, docstring 87 | msgid "\n" 88 | " Sets the twitch user info for individual users to make commands easier\n" 89 | " " 90 | msgstr "" 91 | 92 | #: twitch/twitch.py:381 93 | #, docstring 94 | msgid "\n" 95 | " Get latest Twitch followers\n" 96 | " " 97 | msgstr "" 98 | 99 | #: twitch/twitch.py:406 100 | #, docstring 101 | msgid "\n" 102 | " Get latest twitch clips from a user\n" 103 | " " 104 | msgstr "" 105 | 106 | #: twitch/twitch.py:431 107 | #, docstring 108 | msgid "\n" 109 | " Shows basic Twitch profile information\n" 110 | " " 111 | msgstr "" 112 | 113 | #: twitch/twitch.py:449 114 | #, docstring 115 | msgid "\n" 116 | " Set twitch client_id and client_secret if required for larger followings\n" 117 | " " 118 | msgstr "" 119 | 120 | -------------------------------------------------------------------------------- /twitch/locales/sv-SE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: trusty-cogs\n" 4 | "POT-Creation-Date: 2022-04-18 21:23+0000\n" 5 | "PO-Revision-Date: 2023-05-10 16:10\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Swedish\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Generated-By: redgettext 3.4.2\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Crowdin-Project: trusty-cogs\n" 14 | "X-Crowdin-Project-ID: 510866\n" 15 | "X-Crowdin-Language: sv-SE\n" 16 | "X-Crowdin-File: /dpy-2.0/twitch/locales/messages.pot\n" 17 | "X-Crowdin-File-ID: 452\n" 18 | "Language: sv_SE\n" 19 | 20 | #: twitch/menus.py:229 twitch/menus.py:234 21 | msgid "You are not authorized to interact with this." 22 | msgstr "" 23 | 24 | #: twitch/twitch.py:110 25 | #, docstring 26 | msgid "Twitch related commands" 27 | msgstr "" 28 | 29 | #: twitch/twitch.py:118 30 | #, docstring 31 | msgid "\n" 32 | " Twitch Stream commands\n" 33 | " " 34 | msgstr "" 35 | 36 | #: twitch/twitch.py:125 37 | #, docstring 38 | msgid "\n" 39 | " Twitch Clips commands\n" 40 | " " 41 | msgstr "" 42 | 43 | #: twitch/twitch.py:139 44 | #, docstring 45 | msgid "\n" 46 | " Setup a channel for automatic follow notifications\n" 47 | " " 48 | msgstr "" 49 | 50 | #: twitch/twitch.py:191 51 | #, docstring 52 | msgid "\n" 53 | " Setup a channel for automatic clip notifications\n\n" 54 | " `` The name of the streamers whose clips you want posted\n" 55 | " `[channel]` The channel to post clips into, if not provided will use the current channel.\n" 56 | " `[view_count]` The minimum view count required before posting a clip.\n" 57 | " `[check_back]` How far back to look back for new clips. Note: You must provide a number\n" 58 | " for `view_count` when providing the check_back. Default is 8 days.\n" 59 | " " 60 | msgstr "" 61 | 62 | #: twitch/twitch.py:244 63 | #, docstring 64 | msgid "\n" 65 | " Remove an account from new clip notifications in the specified channel\n" 66 | " defaults to the current channel\n" 67 | " " 68 | msgstr "" 69 | 70 | #: twitch/twitch.py:291 71 | #, docstring 72 | msgid "\n" 73 | " Test channel for automatic follow notifications\n" 74 | " " 75 | msgstr "" 76 | 77 | #: twitch/twitch.py:323 78 | #, docstring 79 | msgid "\n" 80 | " Remove an account from follow notifications in the specified channel\n" 81 | " defaults to the current channel\n" 82 | " " 83 | msgstr "" 84 | 85 | #: twitch/twitch.py:364 86 | #, docstring 87 | msgid "\n" 88 | " Sets the twitch user info for individual users to make commands easier\n" 89 | " " 90 | msgstr "" 91 | 92 | #: twitch/twitch.py:381 93 | #, docstring 94 | msgid "\n" 95 | " Get latest Twitch followers\n" 96 | " " 97 | msgstr "" 98 | 99 | #: twitch/twitch.py:406 100 | #, docstring 101 | msgid "\n" 102 | " Get latest twitch clips from a user\n" 103 | " " 104 | msgstr "" 105 | 106 | #: twitch/twitch.py:431 107 | #, docstring 108 | msgid "\n" 109 | " Shows basic Twitch profile information\n" 110 | " " 111 | msgstr "" 112 | 113 | #: twitch/twitch.py:449 114 | #, docstring 115 | msgid "\n" 116 | " Set twitch client_id and client_secret if required for larger followings\n" 117 | " " 118 | msgstr "" 119 | 120 | -------------------------------------------------------------------------------- /twitch/twitch_models.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | 3 | import discord 4 | 5 | 6 | @dataclass(init=False) 7 | class TwitchProfile: 8 | def __init__(self, **kwargs): 9 | self.id = kwargs.get("id") 10 | self.login = kwargs.get("login") 11 | self.display_name = kwargs.get("display_name") 12 | self.acc_type = kwargs.get("acc_type") 13 | self.broadcaster_type = kwargs.get("broadcaster_type") 14 | self.description = kwargs.get("description") 15 | self.profile_image_url = kwargs.get("profile_image_url") 16 | self.offline_image_url = kwargs.get("offline_image_url") 17 | self.view_count = kwargs.get("view_count") 18 | 19 | @classmethod 20 | def from_json(cls, data: dict): 21 | data = data["data"][0] 22 | return cls(**data) 23 | 24 | def make_user_embed(self) -> discord.Embed: 25 | # makes the embed for a twitch profile 26 | em = discord.Embed(colour=int("6441A4", 16)) 27 | em.description = self.description 28 | url = "https://twitch.tv/{}".format(self.login) 29 | em.set_author(name=self.display_name, url=url, icon_url=self.profile_image_url) 30 | em.set_image(url=self.offline_image_url) 31 | em.set_thumbnail(url=self.profile_image_url) 32 | footer_text = "{} Viewer count".format(self.view_count) 33 | em.set_footer(text=footer_text, icon_url=self.profile_image_url) 34 | return em 35 | 36 | 37 | @dataclass(init=False) 38 | class TwitchFollower: 39 | def __init__(self, **kwargs): 40 | self.from_id = kwargs.get("from_id") 41 | self.to_id = kwargs.get("to_id") 42 | self.followed_at = kwargs.get("followed_at") 43 | 44 | @classmethod 45 | def from_json(cls, data: dict): 46 | return cls(**data) 47 | -------------------------------------------------------------------------------- /weather/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .weather import Weather 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | n = Weather(bot) 12 | await bot.add_cog(n) 13 | -------------------------------------------------------------------------------- /weather/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "TrustyJAID" 4 | ], 5 | "description": "Check the current weather in many cities around the world including in Kelvin.", 6 | "disabled": false, 7 | "end_user_data_statement": "This cog may store User ID's for the purposes of setting default preferred temperature units.", 8 | "hidden": false, 9 | "install_msg": "Thanks for installing. Please set your api_key before using this cog, see `[p]weather set creds` for information on how. Do `[p]weather location` to see the weather in your location.", 10 | "max_bot_version": "0.0.0", 11 | "min_bot_version": "3.5.0", 12 | "min_python_version": [ 13 | 3, 14 | 7, 15 | 2 16 | ], 17 | "name": "Weather", 18 | "permissions": [ 19 | "embed_links" 20 | ], 21 | "required_cogs": {}, 22 | "requirements": [], 23 | "short": "Show the current weather in specified locations!", 24 | "tags": [ 25 | "weather", 26 | "utility" 27 | ], 28 | "type": "COG" 29 | } 30 | -------------------------------------------------------------------------------- /weather/locales/messages.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR ORGANIZATION 3 | # FIRST AUTHOR , YEAR. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: PACKAGE VERSION\n" 8 | "POT-Creation-Date: 2018-12-14 20:39-0700\n" 9 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 10 | "Last-Translator: FULL NAME \n" 11 | "Language-Team: LANGUAGE \n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "Generated-By: redgettext 2.1\n" 16 | 17 | 18 | #: weather.py:12 19 | #, docstring 20 | msgid "Get weather data from https://openweathermap.org" 21 | msgstr "" 22 | 23 | #: weather.py:29 24 | #, docstring 25 | msgid "" 26 | "\n" 27 | " Display weather in a given location\n" 28 | "\n" 29 | " `location` must take the form of `city, Country Code`\n" 30 | " example: `[p]weather New York,US`\n" 31 | " " 32 | msgstr "" 33 | 34 | #: weather.py:40 35 | #, docstring 36 | msgid "Set user or guild default units" 37 | msgstr "" 38 | 39 | #: weather.py:45 40 | #, docstring 41 | msgid "" 42 | "\n" 43 | " Sets the guild default weather units \n" 44 | "\n" 45 | " `units` must be one of imperial, metric, or kelvin\n" 46 | " " 47 | msgstr "" 48 | 49 | #: weather.py:58 weather.py:80 50 | msgid " is not a vaild option!" 51 | msgstr "" 52 | 53 | #: weather.py:62 54 | msgid "Server's default units set to " 55 | msgstr "" 56 | 57 | #: weather.py:66 58 | #, docstring 59 | msgid "" 60 | "\n" 61 | " Sets the user default weather units \n" 62 | "\n" 63 | " `units` must be one of imperial, metric, or kelvin\n" 64 | " Note: User settings override guild settings.\n" 65 | " " 66 | msgstr "" 67 | 68 | #: weather.py:84 69 | msgid " default units set to " 70 | msgstr "" 71 | 72 | #: weather.py:124 73 | msgid "🌍 **Location**" 74 | msgstr "" 75 | 76 | #: weather.py:125 77 | msgid "📏 **Lat,Long**" 78 | msgstr "" 79 | 80 | #: weather.py:126 81 | msgid "☁ **Condition**" 82 | msgstr "" 83 | 84 | #: weather.py:127 85 | msgid "😓 **Humidity**" 86 | msgstr "" 87 | 88 | #: weather.py:128 89 | msgid "💨 **Wind Speed**" 90 | msgstr "" 91 | 92 | #: weather.py:129 93 | msgid "🌡 **Temperature**" 94 | msgstr "" 95 | 96 | #: weather.py:131 97 | msgid "🔆 **Min - Max**" 98 | msgstr "" 99 | 100 | #: weather.py:136 101 | msgid "🌄 **Sunrise (UTC)**" 102 | msgstr "" 103 | 104 | #: weather.py:137 105 | msgid "🌇 **Sunset (UTC)**" 106 | msgstr "" 107 | 108 | #: weather.py:138 109 | msgid "Powered by https://openweathermap.org" 110 | msgstr "" 111 | 112 | -------------------------------------------------------------------------------- /welcome/__init__.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | 4 | from .welcome import Welcome 5 | 6 | with open(Path(__file__).parent / "info.json") as fp: 7 | __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] 8 | 9 | 10 | async def setup(bot): 11 | n = Welcome(bot) 12 | await bot.add_cog(n) 13 | -------------------------------------------------------------------------------- /welcome/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": [ 3 | "irdumb", 4 | "TrustyJAID" 5 | ], 6 | "description": "Welcome new users to the server or say goodbye when they leave.", 7 | "disabled": false, 8 | "end_user_data_statement": "This cog does not persistently store data or metadata about users.", 9 | "hidden": false, 10 | "install_msg": "Use `[p]welcomeset` to see what options are available.", 11 | "max_bot_version": "0.0.0", 12 | "min_bot_version": "3.5.0", 13 | "min_python_version": [ 14 | 3, 15 | 7, 16 | 2 17 | ], 18 | "name": "Welcome", 19 | "permissions": [], 20 | "required_cogs": {}, 21 | "requirements": [], 22 | "short": "Welcome new users to the server", 23 | "tags": [ 24 | "welcome", 25 | "utility" 26 | ], 27 | "type": "COG" 28 | } 29 | --------------------------------------------------------------------------------