Skip to content

Commit

Permalink
Support for d.py 2.0 and Buttons! (#246)
Browse files Browse the repository at this point in the history
* [Spotify] Ensure shuffle edits the message

* [Spotify] Add volume modal to now playing

* [Spotify] you can't delete ephemeral messages

* response.edit_message

* [Hockey] These new objects are prone to issues especially for games outside the US let's just use the tried and true game objects which also lets us post previews like we expect.

* [Spotify] Add yaml upload for emoji lists, fix repeat button custom emojis on initial send

* [Spotify] cleanup code base
move buttons into new components file
make emojis changer one command that accepts .yaml files or individual emojis

* [Spotify] remove these things that re no longer required

* [Spotify] Add new emoji option for navigation, change global namespace of emoji_handler to spotify_emoji_handler

* [Spotify] Validate custom emoji packs, store the author if present on the pack. Allow retreiving the yaml file containing current emojis.

* [Spotify] Allow passing URLs for emoji yaml files

* [Spotify] Properly reset emojis if the emoji pack fails

* [Spotify] catch aiohttp errors

* [Spotify] Store mapping of track_id to track in select

* [Spotify] Remove this subclass since it doesn't work the way I expected

* [Spotify] fix error when running set emojis with no args, add new forward_right emoji change

* [Tweets] fix potential blocking failure point

* [Tarot] Fix display_avatar

* [Hockey] Add stats command

* [Hockey] Use bot.get_context(interaction)

* [Spotify] Use bot.get_context(interaction)

* [Spotify] Allow context menu commands to search Spotify.
Add now command menu to context menu responses.
Improve usability of starting menus with custom content and setting if they're ephemeral or not.

* add recent crowding stuff

* Update Crowdin configuration file

* Try and make crowdin upload to branches

* [RoleTools] Use bot.get_context(interaction) instead

* [RoleTools] Allow buttons *and* select menus on the same message
This moves all the message sending for buttons and select menus into a new area under a new command `[p]roletools message`

* [Hockey] Fix up some menus that use ctx now, add public option on leaderboard command, make stop button handle ephemeral messages, defer pickems so it doesn't fail, fix on_error in slash,

* Add locales for all cogs

* [Insult] Remove controversial insult about monkeys

* [Hockey] Add game recaps

* [ReTrigger] Fix creating triggers with new enum

* [ExtendedModLog] log hybrid commands

* [Runescape] add Hybrid commands

* [Weather] Add hybrid commands

* [Tarot] Add hybrid commands

* [RoleTools] Fix menus and add permissions checks

* [Spotify] Add device type to device select menu

* [EventPoster] prefer hybrid commands over the old way

* [Hockey] Prefer GroupCog inheritance

* [Spotify] Prefer GroupCog inheritance

* [ReTrigger] Prefer GroupCog inheritance
Add default permissions to top level command.
Add guild only even though it doesn't work for subcommands.
Fix attribute definition in event handler since the mixin already defined them.

* [RoleTools] Prefer GroupCog inheritance
Add default permissions for all commands.
Add guild only even though it doesn't work for subcommands.

* [ExtendedModLog] Add logging support for hybrid commands. This may need more tweaking in the future.

* [Hockey] Discord removed 3 and 7 day thread length boost requirements

* [ReTrigger] Fix long description on group cog

* [Destiny] Prefer hybrid commands
Optimize a bunch of code to reduce overall line count specifically related to vendor information. All vendor commands now share a display style with xur and provide weapon perk and armour stats if available.

* Replace `trigger_typing` with `typing`

* [Destiny] Improve vendor displays even more
Add light.gg links to items from vendors
Sort vendor display
Add Saint-14 command to display his inventory
Remove unnecessary testing commands that were not functional

* [Destiny] Use typing if not a slash command
Add generic vendor command to lookup any vendor not currently set as a command

* [Destiny] Try to fail less on vendors with strange inventories

* [Runescape] Defer if interaction and type if not

* [Elements] Add slash command, add select menus to the view
Remove second command in favour of one overall command

* [Elements] Prefer hybrid commands and transformers

* [Runescape] Remove metrics from slash commands

* [Destiny] Remove slash registration, manifest, and token from slash commands

* [Spotify] Prefer hybrid commands

* [RoleTools] Remove slash commands
Move reaction commands to new subcommand `[p]roletools react`

* [RoleTools] Remove existing app commands references until such a time this cog merits them

* [Hockey] Prefer hybrid commands

* ignore implicit string concatenation in pyright

* [Hockey] Fix some permissions checks and roster command, make team finder return a more reasonable response, lists are weird

* [Hockey] Fix some formatting and permissions issues

* [Spotify] Fix context menu commands

* [Spotify] Add `get_user_spotify` method to get all API access as an API

* [Hockey] Add Playoffs series information to game previews
Add new `[p]hockey playoffs` command to display current playoffs rounds and series

* [Spotify] Fix some stuff I think

* [Hockey] Make playoffs command default to the current season provided by the API

* [Hockey] Re-enable pickems buttons if the game start changes
Fix some issues with the playoffs command on previous years

* [Hockey] Automatically fix pickems messages day of if the game start has changed
improve display of preview messages

* [Elements] Include atomic number in autocomplete

* [ExtendedModLog] Show message references on edit and delete if available

* [Elements] Improve transformers

* [Hockey] improve game final detection by checking that the list of goals is equal to the current score and the 3 stars have been set before posting the game final instead of forcing the 20 minute wait and fallback to the 20 minute wait as a last resort. Check goals in-between the rest of the data filling out so that highlight links get edited in more quickly.

* [Hockey] Automatically add new pickems games day-of if they're missing

* Remove leftover app commands checks in roletools

* [Runescape] Add Nemi Forest instance command (#289)

* [Runescape] Add Nemi Forest instance search

* [Runescape] check if depleted

* black

* [Runescape] add headers like in `[p]rs wiki`

* Update runescape/runescape.py

Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>

Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>

* [Runescape] Add viswax command from the Wiki
Make nemiforest command work better with slash command variant

* [Runescape] Add GE commands for RS3 and OSRS for basic item price lookup

* [Runescape] GE commands support `|` separated items

* [Spotify] Add support for new Set API View on `[p]sp set creds`

* [Hockey] Attempt to clear pre-season and playoffs pickems if the game start was over 7 days ago, chances are these games are cancelled and we shouldn't need to track them anymore. Unfortunately the API does not indicate in any way that these games are actually cancelled.

* [Hockey] Only call super().__init__() once in pickems objects

* [Hockey] Fix some issues with leaderboard command as hybrid command, remove unnecessary add reactions permission from most commands

* [Spotify] Use new defer in typing, fix device autocomplete

* [Hockey] Avoid the copy in pickems saving

* [Destiny] Improve OAuth flow

* [Destiny] increase OAuth timeout to 180 seconds

* [Destiny] Use typing for deferral now when applicable, some other improvements

* [Destiny] use timezone aware datetimes everywhere strptime is used

* [ReTrigger] Add replies to edit modal, fix edit modal on triggers that don't have text responses fix some imports and commands that errored due to changed class structure

* [ExtendedModLog] Make text commands show message content like they used to only use the new methods for slash command variants

* [Spotify] Replace recommendations converter with FlagsConverter
Replace slash only recommendations command with hybrid command using FlagsConverter
Include recommendations settings in recommendations embeds

* [Spotify] Make recommendations detailed embed pretty again

* [Spotify] Fix loudness converter in recommendations, improve recommendations doc strings

* [Tweets] 3.0.0 Update to use the new v2 API for everything. This completely breaks the existing stream settings since it is deprecated and planned to be removed on October 29th 2022. The new system requires the bot owner to set the rules for the stream within their restrictions, server mods/admins can still follow accounts as they have in the past but are restricted based on the bot owners defined rules. In the future I plan to add more support for how tweets will eventually be posted filtering via text and not just usernames for server mods/admins but for now we will keep it simple with just user matches.

* [Translate] 2.5.0 Add hybrid command support and message context translate command using the users client locale.

* [Tweets] Allow following a rule in a channel

* [Destiny] cleanup some menu stuff

* [Tweets] Add full OAuth flow allowing anyone to send tweets through the bot. This also reduces overall API rate limits for the main bot owner token and allows for some cool things such as buttons on auto tweets that allow users to like, retweet, and reply to tweets which also exists on the gettweets command menu.

* [Twitter] Add hybrid commands
Default to authenticated user for `tweets` and `user` commands.
rename commands to fit more in line with hybrid command naming scheme.
Add `forgetme` command since we offer OAuth and user saved data now.

* [ServerStats] Add hybrid command support

* [Tweets] Prevent error when stop button is pressed in ephemeral response

* [ServerStats] Increase base timeout of menu, use default menu settings

* [Tweets] defer menu pagination if we need to request new cache info

* [Tweets] Add toggle for stream buttons
Improve @ mention text conversion
Make additional replies not be inline in the embed

* [NASACog] Add new cog utilizing various NASA API's

* [Tweets] Include all hyperlinks to hashtags, cashtags, and replace escaped characters from tweets

* [NASACog] Use more accurate loggers name

* [Welcome] Apply same fix from master in this branch

* [NASACog] Provide nicer error message when images command returns nothing
Add select menu to all menus if applicable

* [NASACog] Add version number and help formatting with version number
add deleted user content since there's nothing to delete

* [NASACog] Add Near Earth Objects command
Rename marsrover commands to mars commands
Build models for Insight although it doesn't currently return any useful displayable information due to trying to preserve power and the endpoint does not return historical data

* [NASACog] Utilize objects better, fix parameters on neo command to actually work

* [NASACog] Add TLE command for satellite TLE lookup
Add Perseverance Mars Rover images lookup
Add skyfield requirement for satellite TLE conversions

* [Translate] Rewrite to be more modular and object oriented

* [NASACog] Add instructions for API Key

* [Spotify] include tekore version in help

* [Tweets] include tweepy version in help

* [Translate] Remove leftover info logging

* [Weather] 1.4.0 Switch to OneCall api from openweathermap
Require user-set API key now
Add forecast data
Allow units to be set at command time instead of needing them to be set prior
Utilize the fact openweathermap returns standard units for kelvin
Include openweathermap icons

* [Weather] Add divider to cardinal directions

* [Weather] Fix wind speed units

* [Weather] Include UV Index, Visibility, and cloudiness
Make embed colour based on UV Index
Add Hourly and Forecast buttons to menu
Make all weather commands use the menu

* [Starboard] Actually delete removed starboards

* [Hockey] Fix some command responses to be more accurate

* [Runescape] Make OSRS and RS3 stats pages consistent

* [RoleTools] Update button creation to use ButtonStyle enum since the raw int no longer works
Try to prevent select view menu from erroring with no pages present.

* [RoleTools] re-add button delete command

* [Runescape] Objectify API methods
This turns all API requests into actual objects containing data rather than methods returning them in the cog.
Significantly improve OSRS stats display and parsing allowing a new OSRS Activities command for other hiscores info.
Improve stats display title to be the correct length regardless of table size.
Add objects for new bossing hiscores, there are no commands to access this yet but I may add them in the future if it's something people want.

* Translate - Re-order on_message checks (#292)

* [Elements] Fix for Transformer Changes

* [Hockey] Fix transformer usage from breaking changes, fix games menu changing viewed game unintentionally when corsi or heatmaps were toggled.

* [Spotify] BPM is not restricted to 0-100. Transformers are no longer classmethods

* [ReTrigger] Fix for breaking change `Interaction.original_message` -> `Interaction.original_response`

* [Hockey] Add option to restrict pickems

* [Destiny] Add random exotic commands, fix Epic Games Link, Get correct seal icon for user command

* [Hockey] Fix some things

* [Mock] Fix for new Asset objects

* [RoleTools] Fix for menus when members other than the bot owner pull up a menu

* [Starboard] Some fixes for d.py 2.0

* [EventPoster] Improve clarity on events and approval buttons

* [Hockey] Fix some issues with pickems and standings

* [Tweets] Move disconnect from info logging to debug logging

* [Hockey] Fix otherdiscords command and autocomplete

* [Starboard] Fix purge function with absolute datetimes, fix issue checking NSFW channels when one of the channels is None

* [ExtendedModLog] Fix unbound local error in on_command

* [ServerStats] Replace avatar.url with member.display_avatar

* [Welcome] Replace member.avatar.url with member.display_avatar

* [RoleTools] Provide nice error message if number of items being sent exceed discords limitation

* Translate - Use display_avatar (#293)

* [Hockey] Various fixes for split squad games, pickems commands, etc.

* [ExtendedModLog] Fix some errors when messages are deleted in deleted or unavailable channels

* [EventPoster] Fix ping command, improve remove event admin command

* [Tweets] Replace the now closed session with None so that a new one gets created properly. Prevent operational disconnect messages from spamming logs

* [Starboard] Look for channels and threads not just channels

* [RoleTools] Provide a nice error when no buttons or options are available to list

* [EventPoster] Defer yes/no buttons, respond to approval buttons appropriately

* [Tweets] Cannot set session to None here like this

* [EventPoster] Improve event cleanup when ending your own event by starting a new one

* [Hockey] Various fixes for game state updates and the otherdiscords command

* [Tweets] Properly log stream errors and only dispatch important events not operational disconnects

* [Hockey] Fix an issue preventing some pickems games from tallying their votes to the leaderboard. Update dev commands related to pickems to fall under the new pickems group command, adjusted the names since the pickems keyword is now part of the group, and added typing indicators for long commands for my own sanity.

* [Tweets] Remove select menu in reply modal since it no longer works, this means all replies will be visible to everyone instead of being able to choose everyone or followers only.

* [Hockey] Fix some key errors on schedule commands, include game ID's in the TeamEntry to ensure the correct game is pulled for reference (this should help with split squad games double posting), provide a nice error when a player is not found from the lookup

* [Tweets] Remove my custom rate limit logic and let tweepy handle it, fix an issue that could continuously recreate the stream client over and over potentially leading to increase in passing rate limits

* [Runescape] account for people who are not in clans

* Translate - Fix wrong format key on message (#295)

* [EventPoster] Remove members from events if they've been removed from the guild

* [Spotify] Fix an error when using recommendations with an artist seed

* [NotSoBot] Update for d.py 2.0

* [ImageMaker] Update for d.py 2.0

* [Hockey] Get goal highlights from updated content API. Include optional goal images on goal update embeds. Fix typing in Schedule. Fix for when season starts there's no streak data. Allow pickems threads to be automatically unarchived if the creation date is less than 9 days past.

* [Tweets] Include correct logic for 429 rate limit handling until it's handled upstream

* [EventPoster] Fix slash command registration

* [Hockey] Fix Slash command registration

* [ReTrigger] Fix slash command registration

* [Spotify] Fix slash command registration

* [Spotify] Fix slash command registration

* [ServerStats] keep menu consistency with close button on the left. Improve display of topservers and newservers commands. Use guild URL's instead of guild ID to improve the display of whois and include when the user joined the guild if available. Also pagify whois earlier and always get a smaller embed size

* [Translate] Fix an issue attempting to translate messages from users who are no longer in the guild

* [Translate] Somehow preda found on_message to cause the previous error too

* [Hockey] Add public option to pickemsvotes so people can silently see their current votes

* [Hockey] Fix an issue when the bot is timed out in a server causing some games to not save their goal information correctly. Add date format to games command. Fix default date on games to accurately reflect the day in pacific time

* [ReTrigger] Remove select menu from edit modal since it's not supported anymore

* [Spotify] Cleanup the play command so that it's easier to maintain

* [Destiny] Add support for dashboard auth

* [Tweets] Add support for dashboard auth

* [Destiny] Add pull from postmaster command, improve manifest downloads

* [Tweets] Remove custom _connect method as it's mostly been fixed upstream, cleanup dashboard auth, fix error in auth user when no redirect_uri is set

* [Hockey] Fix some bugs with game day threads, re-add yesterday today and tomorrow to datefinder, ensure setting goal images doesn't overwrite the embed for other guilds

* [Conversions] Update CoinBase object for only expected keys

* [EventPoster] Improve various things, close threads when event is ended,

* [Spotify] Fix menus when not listening to Spotify

* [Mock] Use display_avatar

* [Tweets] Use localhost in redirect_uri instead of an empty string to prevent false positives

* [Tweets] not all users have urls in their info

* [Tweets] Fix menu edit when interaction is complete. Remove excess info logging on keepalive. Update credential setting.

* [Destiny] Add support for manifest update notifications

* [Hockey] Fix thread unarchiving calculation, remove light flashing code, Allow pickems threads to attempt to unarchive when the button is pressed

* [Hue] 1.3.0 Remove use of phue lib and include own async written lib

* [NASA] Provide a message when there's an API error

* [NASA] Debug log things

* [Hue] Let flash method restore values on the light when complete

* [Hockey] Reduce frequency of attempted pickems button edits, Remove potential unbound check in main loop, Fix some dev pickems commands checking old timezone naive datetimes

* [Destiny] Add dares command to see current Legend Dares modifiers

* [Destiny] Enable the ability to cache the manifest in memory improving command times

* [Hockey] Include wildcard in standings

* [ServerStats] Extreme is gone replaced with Highest on server verification level

* [Destiny] Save caching information to the right place

* Translate - Fix wrong format key on message (#296)

* [ServerStats] Fix avatar command in DM's

* [Destiny] Remove commands linked to stats or history
Improve API access features allowing for reduced response payload size and customizing responses further as necessary across most endpoints and include enums/helpers for generating required responses
Improve clan approval display

* [Hockey] Fix number alignment on standings display, migrate table generation to a single function for better global adjustments

* [ExtendedModLog] Fix logging messages in threads
closes #299

* Starboard - Use Member.display_avatar (#300)

* a typo here. (#302)

* a typo (#303)

a typo

* [EventPoster] Fix race condition when approving events creating duplicate posts and threads

* [Fenrir] Allow to work inside threads

* [Hockey] Implement Pickems weekly backups system

* [Hockey] Redesign parts of player command due to breaking API changes

* [Bingo] 1.0.0 First Commit

* [Bingo] Fix capitalization on credits

* [Bingo] Add optional background image tiling and improve docstrings

* [Bingo] Fix center alignment for 1 line of text

* [Bingo] 1.2.0 Allow customizing the "BINGO" word

* [Bingo] Ensure custom bingo text contains no duplicate characters so it can actually work

* [Bingo] Add a seed option to shuffle everyone's card while maintaining the same tile set

* Translate - Make use of the message_id variable (#304)

* Extendedmodlog - Fix member/role no longer existing in get_permission_change (#305)

* [Hockey] Fix last week saving on weekly reset

* [Destiny] Add craftable command to see which guns are missing complete pattern progress.
Add gilded title completion count.
Try and ask for authorization for more commands when appropriate.

* [weather] API key instructions and error handling (#306)

* weather: Handle API errors consistently.

* weather: Handle APIError as string response.

* weather: Correct name of api key in creds help.

* weather: Add missing subscribe to One Call by Call step.

* [Destiny] Redesign Loadout command to display in-game loadouts now and allow equipping them through new commands like `[p]loadout equip` and `[p]loadout view`
- Move vendors to their own group command to make room for more top level commands in the cog
- Fix manifest loop error when the API is down
- Show current clan weekly rewards in the clan info command
- Add commendation bar to user command
- Humanize numbers on currency
- Redesign Nightfall command to better display all modifiers and new information
- Fix Dares command activity hash
- Redesigned activity display to be generic currently used for dares and nightfall commands but could be used for future commands, this also adds string variable replacement where appropriate now

* [weather] Fix moon phase emoji index calcuation. (#307)

- OneCall `daily[#].moon_phase` from the API is a float from 0 to 0.99
- divide by 0.125 to convert this to range(0,8) index into MOONS

* [Destiny] Add news command to lookup the most recent 25 news articles
- Add better error handling for API requests to let users know the API is currently down if it is
- Clear temp loadout cache internally and check freshness of the data
- Add get PostGameCarnageReport get method

* [Destiny, EventPoster, Hockey, ReTrigger, Spotify] Remove slash command setup commands and config since core will handle it now

* [ReTrigger] Rework application commands to work with latest updates

* [Hockey] Fix error in PlayerFinder causing slash commands to fail on player lookup

* [RoleTools] Fix typo in select option doc strings

* [Weather] Remove current weather from the hourly and forecast weather data

* [RoleTools] Add support for require any which will be a toggle setting on the role for requirements.
Add more verbose information to why a role could not be assigned when a button is pressed to assign a role instead of always saying it worked when it probably didn't.
Clean up some dialogue in help strings since reactions aren't the only feature in this cog anymore.
Add aliases to commands because I keep forgetting them and some aliases make sense.

* [Spotify] Remove abc methods that were removed

* [ServerStats] fix broken icons (#309)

* [Destiny] Save character information for autocomplete
- Fix some issues with replace_string
- Cache character data locally for use with autocomplete
- Allow components to be passed to endpoints for customization of responses
- Add automatic manifest updating support

* [EventPoster] Add word boundary search around links and largelinks
- Add view command for largelinks to preview them

---------

Co-authored-by: Karlo Prikratki <karlo@karloprikratki.com>
Co-authored-by: Predä <46051820+PredaaA@users.noreply.github.com>
Co-authored-by: kpop dev <28566705+kpopdev@users.noreply.github.com>
Co-authored-by: Ben Armstrong <synrg@debian.org>
Co-authored-by: Lemon Rose <78662983+japandotorg@users.noreply.github.com>
  • Loading branch information
6 people authored May 4, 2023
1 parent 9f1d6ae commit 431986b
Show file tree
Hide file tree
Showing 324 changed files with 61,064 additions and 24,023 deletions.
51 changes: 51 additions & 0 deletions .utils/locales/fr-FR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
msgid ""
msgstr ""
"Project-Id-Version: trusty-cogs\n"
"POT-Creation-Date: 2022-04-18 21:23+0000\n"
"PO-Revision-Date: 2022-04-22 20:47\n"
"Last-Translator: \n"
"Language-Team: French\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.4.2\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Crowdin-Project: trusty-cogs\n"
"X-Crowdin-Project-ID: 510866\n"
"X-Crowdin-Language: fr\n"
"X-Crowdin-File: /dpy-2.0/.utils/locales/messages.pot\n"
"X-Crowdin-File-ID: 422\n"
"Language: fr_FR\n"

#: .utils/utils.py:173
#, docstring
msgid "Utilities for Cog creation!"
msgstr ""

#: .utils/utils.py:179
#, docstring
msgid "Ensure all info.json files are up-to-date with current standards"
msgstr ""

#: .utils/utils.py:299
#, docstring
msgid "Generate a new info.json file for your new cog!"
msgstr ""

#: .utils/utils.py:339 .utils/utils.py:389
#, docstring
msgid "Count the number of lines of .py files in all folders"
msgstr ""

#: .utils/utils.py:426
#, docstring
msgid "Generate README.md from info about all cogs"
msgstr ""

#: .utils/utils.py:472
#, docstring
msgid "Generate a requirements.txt for all cogs.\n"
" Useful when setting up the bot in a new venv and requirements are missing.\n"
" "
msgstr ""

51 changes: 51 additions & 0 deletions .utils/locales/sv-SE.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
msgid ""
msgstr ""
"Project-Id-Version: trusty-cogs\n"
"POT-Creation-Date: 2022-04-18 21:23+0000\n"
"PO-Revision-Date: 2022-04-22 20:47\n"
"Last-Translator: \n"
"Language-Team: Swedish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.4.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Crowdin-Project: trusty-cogs\n"
"X-Crowdin-Project-ID: 510866\n"
"X-Crowdin-Language: sv-SE\n"
"X-Crowdin-File: /dpy-2.0/.utils/locales/messages.pot\n"
"X-Crowdin-File-ID: 422\n"
"Language: sv_SE\n"

#: .utils/utils.py:173
#, docstring
msgid "Utilities for Cog creation!"
msgstr ""

#: .utils/utils.py:179
#, docstring
msgid "Ensure all info.json files are up-to-date with current standards"
msgstr ""

#: .utils/utils.py:299
#, docstring
msgid "Generate a new info.json file for your new cog!"
msgstr ""

#: .utils/utils.py:339 .utils/utils.py:389
#, docstring
msgid "Count the number of lines of .py files in all folders"
msgstr ""

#: .utils/utils.py:426
#, docstring
msgid "Generate README.md from info about all cogs"
msgstr ""

#: .utils/utils.py:472
#, docstring
msgid "Generate a requirements.txt for all cogs.\n"
" Useful when setting up the bot in a new venv and requirements are missing.\n"
" "
msgstr ""

4 changes: 2 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 TrustyJAID
Copyright (c) 2017-present TrustyJAID

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
86 changes: 43 additions & 43 deletions README.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions addimage/addimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ async def local_perms(self, message: discord.Message) -> bool:
return await self.bot.allowed_by_whitelist_blacklist(
message.author,
who_id=message.author.id,
guild_id=message.guild.id,
guild=message.guild,
role_ids=[r.id for r in author.roles],
)
except AttributeError:
Expand Down Expand Up @@ -227,7 +227,7 @@ async def on_message(self, message):
ignore_global = await self.config.guild(guild).ignore_global()
if alias in [x["command_name"] for x in await self.config.images()] and not ignore_global:
if channel.permissions_for(channel.guild.me).attach_files:
await channel.trigger_typing()
await channel.typing()
image = await self.get_image(alias)
async with self.config.images() as list_images:
list_images.remove(image)
Expand All @@ -243,7 +243,7 @@ async def on_message(self, message):

if alias in [x["command_name"] for x in await self.config.guild(guild).images()]:
if channel.permissions_for(channel.guild.me).attach_files:
await channel.trigger_typing()
await channel.typing()
image = await self.get_image(alias, guild)
async with self.config.guild(guild).images() as guild_images:
guild_images.remove(image)
Expand Down Expand Up @@ -398,7 +398,7 @@ async def remimage(self, ctx: commands.Context, name: str) -> None:
await ctx.send(name + _(" is not an image for this guild!"))
return

await channel.trigger_typing()
await channel.typing()
all_imgs = await self.config.guild(guild).images()
image = await self.get_image(name, guild)
all_imgs.remove(image)
Expand Down Expand Up @@ -426,7 +426,7 @@ async def rem_image_global(self, ctx: commands.Context, name: str) -> None:
await ctx.send(name + _(" is not a global image!"))
return

await channel.trigger_typing()
await channel.typing()
all_imgs = await self.config.images()
image = await self.get_image(name)
all_imgs.remove(image)
Expand Down
34 changes: 17 additions & 17 deletions addimage/info.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"author" : [
"author": [
"TrustyJAID"
],
"description" : "Add image for the bot to directly upload similar to alias.",
"disabled" : false,
"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.",
"hidden" : false,
"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.",
"max_bot_version" : "0.0.0",
"min_bot_version" : "3.1.8",
"min_python_version" : [
"description": "Add image for the bot to directly upload similar to alias.",
"disabled": false,
"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.",
"hidden": false,
"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.",
"max_bot_version": "0.0.0",
"min_bot_version": "3.5.0",
"min_python_version": [
3,
7,
2
],
"name" : "AddImage",
"permissions" : [
"name": "AddImage",
"permissions": [
"attach_files"
],
"required_cogs" : {},
"requirements" : [],
"short" : "Add images for direct upload per guild and globally.",
"tags" : [],
"type" : "COG"
}
"required_cogs": {},
"requirements": [],
"short": "Add images for direct upload per guild and globally.",
"tags": [],
"type": "COG"
}
171 changes: 171 additions & 0 deletions addimage/locales/fr-FR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
msgid ""
msgstr ""
"Project-Id-Version: trusty-cogs\n"
"POT-Creation-Date: 2022-04-18 21:23+0000\n"
"PO-Revision-Date: 2022-04-22 20:47\n"
"Last-Translator: \n"
"Language-Team: French\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.4.2\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Crowdin-Project: trusty-cogs\n"
"X-Crowdin-Project-ID: 510866\n"
"X-Crowdin-Language: fr\n"
"X-Crowdin-File: /dpy-2.0/addimage/locales/messages.pot\n"
"X-Crowdin-File-ID: 494\n"
"Language: fr_FR\n"

#: addimage/addimage.py:22
#, docstring
msgid "\n"
" Add images the bot can upload\n"
" "
msgstr ""

#: addimage/addimage.py:63 addimage/addimage.py:409 addimage/addimage.py:437
msgid "Error deleting image {image}"
msgstr ""

#: addimage/addimage.py:110
msgid "No prefix found."
msgstr ""

#: addimage/addimage.py:273
#, docstring
msgid "\n"
" Add an image for the bot to directly upload\n"
" "
msgstr ""

#: addimage/addimage.py:281
#, docstring
msgid "\n"
" Delete all triggers created by a specified user ID.\n"
" "
msgstr ""

#: addimage/addimage.py:290
#, docstring
msgid "\n"
" Toggle usage of bot owner set global images on this server\n"
" "
msgstr ""

#: addimage/addimage.py:296
msgid "Bot owner global images enabled."
msgstr ""

#: addimage/addimage.py:298
msgid "Ignoring bot owner global images."
msgstr ""

#: addimage/addimage.py:305
#, docstring
msgid "\n"
" List images added to bot\n"
" "
msgstr ""

#: addimage/addimage.py:318
msgid "I do not have any images saved!"
msgstr ""

#: addimage/addimage.py:326
msgid "__Author__: "
msgstr ""

#: addimage/addimage.py:328
msgid "__Count__: "
msgstr ""

#: addimage/addimage.py:334
msgid "Page "
msgstr ""

#: addimage/addimage.py:342
#, docstring
msgid "\n"
" Clears the full set of images stored globally\n"
" "
msgstr ""

#: addimage/addimage.py:356
#, docstring
msgid "\n"
" Clear all the images stored for the current server\n"
" "
msgstr ""

#: addimage/addimage.py:371
#, docstring
msgid "\n"
" Cleanup deleted images that are not supposed to be saved anymore\n"
" "
msgstr ""

#: addimage/addimage.py:389 addimage/addimage.py:418
#, docstring
msgid "\n"
" Remove a selected images\n\n"
" `name` the command name used to post the image\n"
" "
msgstr ""

#: addimage/addimage.py:398
msgid " is not an image for this guild!"
msgstr ""

#: addimage/addimage.py:413
msgid " has been deleted from this guild!"
msgstr ""

#: addimage/addimage.py:426
msgid " is not a global image!"
msgstr ""

#: addimage/addimage.py:441
msgid " has been deleted globally!"
msgstr ""

#: addimage/addimage.py:483
msgid "Image adding timed out."
msgstr ""

#: addimage/addimage.py:486
msgid "Image adding cancelled."
msgstr ""

#: addimage/addimage.py:494
#, docstring
msgid "\n"
" Add an image to direct upload on this server\n\n"
" `name` the command name used to post the image\n"
" "
msgstr ""

#: addimage/addimage.py:501 addimage/addimage.py:528
msgid " is already in the list, try another!"
msgstr ""

#: addimage/addimage.py:504 addimage/addimage.py:531
msgid " added as the command!"
msgstr ""

#: addimage/addimage.py:507 addimage/addimage.py:534
msgid "Upload an image for me to use! Type `exit` to cancel."
msgstr ""

#: addimage/addimage.py:513 addimage/addimage.py:540
msgid " has been added to my files!"
msgstr ""

#: addimage/addimage.py:520
#, docstring
msgid "\n"
" Add an image to direct upload globally\n\n"
" `name` the command name used to post the image\n"
" "
msgstr ""

Loading

0 comments on commit 431986b

Please sign in to comment.