Compare commits

..

842 Commits

Author SHA1 Message Date
Michael H
11d87067aa Version Bump
- d.py 1.2.3 -> 1.2.4
 - Red 3.1.5 -> 3.1.6

This fixes a critical issue with voice connections.
2019-10-17 21:43:24 -04:00
Toby Harradine
6c9c57c14d Bump version to 3.1.5
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-31 09:23:18 +10:00
Toby Harradine
404c5f6dc0 [Audio] Bump Lavalink version to 3.2.1_823
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-31 09:22:16 +10:00
Toby Harradine
f0f274e1e1 Bump version to 3.1.4
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-16 11:26:25 +10:00
Toby Harradine
e9f014df07 Revert "Update Crowdin configuration file" (#2878)
This reverts commit 03e59ea9.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-16 10:44:49 +10:00
Toby Harradine
778eadd418 [ModLog] Fix get_case() and get_casetype() (#2877)
This fixes `[p]reason` and `[p]case` with cases that were created after 3.1.3.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-15 20:18:21 +10:00
Toby Harradine
3de9d15410 [CustomCom] Set Requires.ready_event before invoking CC (#2876)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-15 20:13:06 +10:00
Michael H
3b0567d261 bump (#2864) 2019-07-14 00:17:44 -04:00
Michael H
49a75b5f19 command translator quick fix (#2870)
* command translator quick fix

* command translator quick fix
2019-07-14 13:55:47 +10:00
Toby Harradine
8676dd3ce3 [i18n] Update translation catalogs (#2867)
* [i18n] Update translation catalogs

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Install redgettext 3.1 in travis crowdin deployment

Last time the catalog templates were updated, redgettext 3.0 was used. I'd rather Travis didn't upload them after extracting with an older version.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-13 23:52:18 -04:00
Toby Harradine
d5c412e3df [Permissions] Fix Requires.ready_event.set() on subcommands (#2868)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-13 23:05:07 -04:00
Toby Harradine
1d2980f8fa [Permissions] Send help on missing argument (#2865)
* [Permissions] Send help on missing argument

Resolves #2851.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* [Permissions] Use varargs instead of Greedy converter

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-13 21:52:28 -04:00
jack1142
3e80edcdfd [Docs] Add awaits and missing imports in usage examples (#2860)
Well, the modlog examples had to be changed a lot, because `await` obviously won't work in regular method.
2019-07-14 11:30:10 +10:00
aikaterna
be184b57dd [Audio] Update equalizer permissions (#2813)
* [Audio] Update equalizer permissions

* Reformat header on eq list for i18n

* Style
2019-07-13 20:48:13 -04:00
Toby Harradine
f83f378528 [Core] Make Requires.verify() wait until rules are loaded (#2857)
* Make Requires.verify() wait until rules are loaded

Also ensures `Requires` objects are reset when unloaded, particularly in case a `Command` object manages to stay in memory between cog unload and load, and its permissions rules change between those events.

Also, this PR re-ordered some of the event loop policy stuff, because it was required that the event loop policy be set before creating any `Requires` objects. This may or may not have an effect on other `get_event_loop()` calls elsewhere (either in our code, a dependency's, or asyncio's). Either way, these effects would be a *correction*, and any bugs that arise from it are likely to have been occurring silently beforehand.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Remove calls to `remove_listener()` in permissions

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Fix adding rules for permissions cog/commands itself

Also addresses feedback

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Clean up indentation when setting uvloop policy

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Use `set(walk_commands())` to traverse `Group` subcommands

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-13 20:47:40 -04:00
Michael H
21a6384ebf [Modlog] Fix get_case for missing cases (#2858)
Due to the modlog redesign, the detection for a missing case changed. This fixes `get_case` for this.

This resolves #2844.
2019-07-14 10:47:16 +10:00
Toby Harradine
03e0683dd7 [ModLog] Actually prevent duplicate kwarg error
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-13 14:39:50 +10:00
Michael H
ac2813012a [Core] Cog load fixes (#2854)
* split out some fixes from red#2853

* address feedback

* feedback
2019-07-12 22:11:06 -04:00
Toby Harradine
e34eca557b [ModLog] Prevent duplicate kwarg error (#2848)
* [ModLog] Prevent duplicate kwarg error

The `name` key used to be set in the Config for casetypes.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Don't mutate `data` argument

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-12 20:17:00 -04:00
Flame442
687b88ca6f Added some periods to some strings (#2852) 2019-07-12 18:29:27 -04:00
DevilXD
776c75ba86 Fixed [p] not being replaced in code blocks (#2846) 2019-07-09 03:22:52 -04:00
aikaterna
55ff9bedb7 [Audio] Check for player when not connected (#2842) 2019-07-08 13:17:50 +10:00
Toby Harradine
2bdc3ac10c [General] Fix KeyError in [p]urban
Resolves #2841.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-07 18:51:36 +10:00
Toby Harradine
f2039300c2 [Mongo] Use escaped identifiers to extract inner value (#2832)
This was causing a KeyError to be raised whenever a key containing $ or . was part of the identifiers path, even if the value was actually in the dict.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-07-05 18:02:18 -04:00
Cog-Creators Bot
03e59ea9d3 Update Crowdin configuration file 2019-07-05 20:21:25 +02:00
Draper
a89a156f8e [Context] Adds react_quietly method to context (#2834)
* [Context] Adds react_quietly method to context

This allows developers to emojis to command messages
This is a modified version of tick()

It accepts True/False for Tick/Cross emoji and in addition to that any other emoji the bot can see

* Removed True/False support from react quietly

* Stopped catching InvalidArgument on react_quietly so that is propagated to devs
2019-07-03 15:26:22 -04:00
Michael H
0eb22c84ff [Bank API] Add cost decorator (#2761) 2019-07-03 10:07:19 +10:00
aikaterna
d1593b8069 [Audio] Catch unhandled internal folder types (#2824)
The `folder:` and `localfolder:` prefixes are used internally with some localtracks strings to define what to do with the item when it's cycled through the search function. Users theoretically should have never seen this issue as [p]search is used on the user side for YouTube and Soundcloud searching and not local searching, but this handles the issue where a folder is being passed to these functions that doesn't exist.
2019-07-02 13:15:34 +10:00
aikaterna
93391d028c [Audio] _enqueue_tracks clarification/fix (#2822)
Resolves #2820.

Added some comments to clear up a little of the mystery in a couple places.
2019-07-02 13:11:44 +10:00
Flame442
142fb0ad08 [Trivia] Car list fixes (#2825) 2019-07-02 12:03:12 +10:00
jack1142
942dca43d3 [Downloader]: RepoManager: don't load repos in __init__ (#2829)
Loading repos is already done in initialize() method.
This could actually turn out badly
if both
of git processes would touch the same repo at the same time.

This also fixes create_backup in
setup.py - now it properly generates repos.json
2019-07-02 11:57:30 +10:00
jack1142
081bf663a4 test(core): ignore pylint's ImportErrors for distro package (#2830) 2019-07-01 21:54:56 -04:00
Toby Harradine
55e309125e Add uvloop as Posix+CPython dependency and tweak new Make recipes (#2819)
- uvloop is now a dependency on non-Windows CPython systems
- `make setupenv` renamed to `make newenv`
- `make syncenv` added to sync local venv to current dependencies
- `dev-requirements.txt` moved into `tools` directory
2019-07-02 11:53:38 +10:00
Flame442
7323e8eb67 [Trivia] Beethoven corrections for entertainment list (#2823) 2019-07-01 09:29:26 +10:00
Michael H
098540b9e5 [Core] Fix user output on cog load/reload (#2767)
* [Core] Fix user output on cog load/reload

  - Properly fixes the load/reload exception handling
  - Fixes some i18n use here to not make assumptions about other
  languages pluralization rules.

* Fix some typos

* Address Flame's Feedback

* It's important to save before committing ...

* formatting

* Fix some formats...
2019-06-29 12:16:28 -04:00
Elizabeth Sherrock
10412c4f51 Fix broken link in set color docstring (#2803) 2019-06-30 01:35:47 +10:00
PredaaA
2f8b1a21c7 [Audio] Fix config set in shuffle and repeat commands (#2812)
Resolves #2811 and also the same thing in repeat command.
2019-06-30 01:28:29 +10:00
PredaaA
03fe3ee720 [i18n] Fix some missing i18n strings in the whole bot (#2633) 2019-06-30 01:13:53 +10:00
Michael H
8a72840de0 [Utils] Modify chmod use in safe_delete (#2701)
- Takes a pessmisitc approach that it's possible chmod succeeds, but
 deletion fails and does not make the entire dir world writeable
2019-06-30 00:45:44 +10:00
Ryan
8bf86f33a3 [Readme] Update RTD and d.py URLs (#2771) 2019-06-30 00:33:41 +10:00
Michael H
8637f8a852 [Filter] Fix cache invalidation (#2810) 2019-06-30 00:30:09 +10:00
Toby Harradine
bff7e214ab Kill JsonIO and fix JSON driver caching issues (#2796)
* Kill JsonIO and fix JSON driver caching issues

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Ensure lock covers critical region in set()

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Make tests pass

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Use pickle over deepcopy in Config

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Fix temp instance creation

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Serialise value before doing anything in set()

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-06-27 14:49:45 -04:00
Toby Harradine
f3bbfdc64d Fix duplicate commands in fuzzy help (#2798)
* Fix duplicate commands in fuzzy help

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Use help command's filter for all fuzzy

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-06-27 13:31:44 -04:00
Toby Harradine
461f56bca1 Kill Pipfile, update dependencies, and add dep bumping tools (#2806)
### Replacement for pipenv's environment setup
First of all, there's a new Make recipe for all devs and contributors on both Windows and Posix, `make setupenv`, which is kind of a replacement for `pipenv install --dev`. It creates a virtual environment in `.venv` using the inbuilt `venv` module, clearing out any existing virtual environment if needed first. Then it installs all dev dependencies using our new `dev-requirements.txt` file. `CONTRIBUTING.md` has been updated to reflect all of this.

### Dependency version bumping tool
Secondly, I've added a python script, `tools/bumpdeps.py` to help with bumping dependency versions. It has its own Make recipe too, `make bumpdeps`. This script won't work on Windows (yet). It reads the `tools/primary_deps.ini` file, which contains the primary requirements of Red and its extras with loose version specifiers, and outputs all pinned dependencies, in `setup.cfg` format. It's not a foolproof dependency resolver, it's quite simple, but it's bound to help out a lot. It'll try to give warnings if there might be a version conflict, but updating `setup.cfg` with its output and then doing `pip install -r dev-requirements.txt` will allow pip to issue warnings if something is conflicting.

So to add a new dependency, add it to `tools/primary_deps.ini` in the appropriate place, and either use `make bumpdeps` to completely update all dependencies, or simply add it to `setup.cfg` manually with its sub-dependencies, and all versions pinned.

### Sphinx 2.1.2 (docs changes)
The sphinx update brought along the ability to disable type annotations being rendered in function and method signatures, and I have gladly gone and done that. Type annotations should already be specified under the "Parameters" section, and the way sphinx renders them in function signatures makes them much harder to read.

Also, documented classes will now display what classes they inherit from.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-06-28 00:16:14 +10:00
aikaterna
d1d4ec3e38 [Audio] No capitalization needed (#2801) 2019-06-27 08:13:01 -04:00
aikaterna
a0f34bbbd9 [Audio] Move DJ role check in [p]summon (#2799) 2019-06-27 10:48:06 +10:00
Toby Harradine
49819a2eeb [ModLog] Fix get_all_casetypes() (#2807)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-06-26 20:39:22 +10:00
Toby Harradine
f91d8610ae [ModLog] Use custom scopes for ModLog Config (#2766)
Modlog was the biggest culprit for seriously large documents in the MongoDB backend, since it stored all cases as nested dicts in the guild scope. So, for example, on the Fortnite server, the guild document for Kowlin's bot had exceeded 8MB. 

This commit gives each case its own document. It also does the same for casetypes. Not only does it remove the possibility of the document exceeding the maximum size in MongoDB, it's also just more efficient for all backends.

Other misc changes: Fixed a bunch of type-hints, and also added more support for when an object related to a case (user, moderator, channel etc.) can't be found (because it was deleted or something rather)

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-06-26 00:52:33 +10:00
kennnyshiwa
52f5d5cd6a [Mod] add role mentions to userinfo and reverse role sorting (#2759)
* add role mentions to userinfo and reverse role sorting

This small PR adds the role mentions to userinfo and reverses the sorting so that the top most role of a user is at the left of the embed

* Remove sorting as it's handled by d.py
2019-06-24 02:39:03 -04:00
aikaterna
870b615364 [Audio] Queue & misc cleanup (#2784)
* [Audio] Queue & misc cleanup
2019-06-24 01:09:04 -04:00
aikaterna
25ccc11dc4 [Audio] Add [p]summon (#2786) 2019-06-24 01:05:01 -04:00
aikaterna
f2b7ce9546 [Audio] Add equalizer (#2787)
* [Audio] Add equalizer

* [Audio] Add equalizer
2019-06-24 00:58:20 -04:00
DiscordLiz
6bdc9606f6 [Core] Multiple mod admin roles (#2783)
* Adds Schema versioning
  - Adds Migration tool
  - Adds tool to migrate to allow multiple admin and mod roles
  - Supports Multiple mod and admin roles

* Ensures migration is run prior to cog load and connection to discord

* Updates to not rely on singular mod/admin role id

* Update requires logic for multiple mod/admin roles

* Add new commands for managing mod/admin roles

* Feedback

Update strings
Update docstrings
Add aliases

* Use snowflakelist

* paginate

* Change variable name

* Fix mistake

* handle settings view fix

* Fix name error

* I'm bad at Ux

* style fix
2019-06-23 23:36:00 -04:00
Toby Harradine
71d0bd0d07 Various Config and Mongo Driver fixes (#2795)
- Fixes defaults being mixed into custom groups above the document level when doing `Group.all()`
- Fixes `Config.clear_all()` with Mongo driver
- Fixes `Group.set()` with Mongo driver on custom groups above the document level
- Fixes `IdentifierData.custom_group_data` being set to the wrong thing in `BaseDriver.import/export_data` (although this was an inconsequential bug)

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-06-24 12:55:49 +10:00
Michael H
6ae3040aac [Filter] Make name filtering behavior consistent (#2794)
- Uses the updated filter check
  - This is also a performance gain on large servers with filter names
  enabled.
2019-06-23 16:39:24 +10:00
aikaterna
065396abab [Audio] Change Lavalink.jar version checking (#2785) 2019-06-23 14:10:31 +10:00
Toby Harradine
1804314f45 [Audio] Improve Lavalink download/connection exception handling (#2764)
- More errors will be logged to the console with clearer messages when something goes wrong
- Downloading the Lavalink Jar will abort after 5 failed attempts. The connect task will also abort if an unhandled exception occurs whilst downloading or connecting to Lavalink. After this occurs, instead of responding "Connection to Lavalink has not yet been established" to commands, the bot will respond "Connection to Lavalink has failed". This has no effect on other commands which don't involve connecting to Lavalink (e.g. settings commands).
- Logs this message when Lavalink jar is successfully downloaded: `Successfully downloaded Lavalink.jar (<x> bytes written)`
- Uses [`tqdm`](https://github.com/tqdm/tqdm/) to display a progress bar whilst downloading Lavalink.jar.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-06-23 14:09:59 +10:00
DevilXD
ff894ecbe7 [Docs] Add warning about PATH on Windows (#2791) 2019-06-23 13:55:48 +10:00
jack1142
0bf54fae52 [Admin] Convert set to list because set is not JSON serializable (#2792) 2019-06-23 13:33:27 +10:00
MeatyChunks
3c66c602f6 [Help] Prevent spamming when a user blocks the bot (#2790)
Currently the bot sends an error message for each page of help, this should make it only send once.
2019-06-22 01:41:11 -04:00
aikaterna
e854716236 [Audio] Fix for escape character prefixes (#2789) 2019-06-21 22:19:57 -04:00
jack1142
beb16b81a9 docs(config): wrong code example in Value.__call__ (#2780)
fix #2775
2019-06-21 21:24:23 -04:00
jack1142
57d5c0870a style(modlog): Phrase information about reason command better (#2777) 2019-06-19 08:40:25 -04:00
Neuro Assassin
9d008d587a [V3 Core] Add checks to [p]command (#2770)
* Add checks to [p]command

* Change to privilege level
2019-06-18 21:35:56 -04:00
DiscordLiz
804d6eecea [Core] Fix DictConverterer error handling format (#2776) 2019-06-18 21:25:49 -04:00
Toby Harradine
cc927248f0 Revert custom Bot.process_commands behaviour (#2768)
This still preserves the new event, which was a welcome change. However, context still needs to be invoked when a command isn't found, so `on_command_error` can still catch `commands.CommandNotFound`.

Fixes broken fuzzy help.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-06-12 18:27:47 -04:00
Toby Harradine
d133598d80 [Audio] Fix OSErrors on mixed-filesystem environments (#2765)
Resolves the issue outlined [here](https://github.com/Cog-Creators/Red-DiscordBot/issues/2682#issuecomment-500185495).

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-06-09 16:04:13 +10:00
Michael H
682ee1a459 [Docs] Fixes the docs for commands.Command.error (#2760)
* docfix

* inline code for sphinx, not a ref
2019-06-04 20:21:30 +02:00
El Laggron
61b5730c48 [V3 Core] More features for the bot invite URL (#1847)
* Add inviteset group command

* Fix errors

* Fix line break

* Remove user bot support

* Fix docstrings line breaks

* Remove embed specific formatting

* Remove invite redirect

* Add self argument to _can_get_invite_url

* Remove unused import

* fix errors related to classes + double help

* Removed self bot support
2019-06-03 11:46:13 -04:00
DevilXD
463d8d6306 [Commands] Added optional default_unit to the TimedeltaConverter (#2753)
* Added default_unit to the TimedeltaConverter

* Fixed a possible converter crash

* Updated get_timedelta_converter to incorporate the new kwarg
2019-06-03 07:46:55 -04:00
aikaterna
da40511306 [Audio] Remove blacklisted architectures (#2755) 2019-06-02 18:56:41 -04:00
aikaterna
c2195ec576 [Audio] Add bot permission checks (#2756) 2019-06-02 18:55:44 -04:00
Michael H
16443c8cc0 [CI] Improve automated checks (#2702)
* same stuff, but with some more spurious error supression

* fix issue in permissions found in this

* fix a few more spurious errors

* fix another issue

* semi-spurious error fixes

* .

* formatting

* move this to properly log

* distutils import + virtualenv

* more fixes
2019-06-02 19:42:57 +02:00
Bakersbakebread
9116cd02e6 [Core] Pass exceptions on Cog Load to user. (#2754) 2019-06-02 11:57:43 -04:00
Flame442
652d9fe950 Update version number to 3.1.2 🎉 (#2751) 2019-05-31 17:58:04 -04:00
Ryan
e956e6e320 [Streams] Ignore lack of rerun info where not available (#2748) 2019-05-31 16:41:23 -04:00
aikaterna
2e58922d01 [Audio] Lavalink jar bump (#2750) 2019-05-31 16:26:20 -04:00
Michael H
33b7652b62 [Help] Detatch menu usage into a task (#2725)
* [Help] Detatch menu usage into a task

  - This resolves #2712
  - This is a minor API change. Conceptually, the difference is minor in
  nature `bot.send_help_for` returns when help has been sent, however
  this can now be prior to when the help menu (if one is in use) is
  closed.

  - This should not be considered breaking as there is and has been a
  a warning about this file's APIs being still up for unannounced modifications
  No developers should be currently relying on this behavior.

* operator precendence
2019-05-31 21:41:04 +02:00
Michael H
0e9086ca1f [Core] Fix error handling in loading extensions. (#2688)
* fixes 2687

* raise the right exception
2019-05-31 21:38:44 +02:00
Michael H
3ca2a9af28 [Help] Fix long cog helps (#2730)
* [Help] Fix long cog helps

  - Why do people thing a category help of over 250 characters is more
  useful than putting the help in relevent commands?!

* toss an MD fix in here too I guess
2019-05-31 21:37:50 +02:00
DiscordLiz
e7b615d921 [Commands] Adds support for non interactive use (#2746)
Adds assume_yes to context
Changes cleanup's 100+ check
Changes cog update.
2019-05-31 05:54:27 -04:00
Matan Kushner
2cb6e98092 [Readme] Anilist → AniList (#2747) 2019-05-31 05:39:14 -04:00
DiscordLiz
1ccc441aab [Core] Make contact use configured destinations (#2743)
* Make contact use configured destinations
2019-05-31 05:32:26 -04:00
DiscordLiz
8ddc5aa63e [Core] Add commands to manage owner notification destinations. (#2745) 2019-05-31 05:13:36 -04:00
DevilXD
f894b62bfe [CustomCom] Fixed KeyError on specific message edge-case (#2739)
fixes #2679
2019-05-29 22:36:32 -04:00
DevilXD
aac9369f3f [Mod] Add [p]slowmode (#2734)
Makes use of new timedelta converter
2019-05-29 10:01:27 +10:00
DiscordLiz
1581604f71 Add a timedelta converter (#2736)
* Add a timedelta converter

This reuses a lot of logic from @mikeshardmind 's scheduler cog with permission

It adds a timedelta converter
It keeps it generalized as requested
It keeps the function available for non converter use as requested

* Handle feedback

* style fix
2019-05-28 12:43:55 -04:00
DiscordLiz
56161c0a88 Send to owners (#2738)
* Add bot.send_to_owner

resolves #2665

Adds some basic methods and config entries.

Does not add commands for modifying this yet.

* Use send_to_owners in events

* handle feedback
2019-05-28 12:37:02 -04:00
DiscordLiz
242df83785 [Image] Fix some issues in strings (#2737) 2019-05-28 02:47:44 -04:00
Stonedestroyer
2338ad8223 [Image] Fix giphy api (#2653)
* Remove hardcoded Giphy key.

Allows you to set your own Giphy API key.

* Run black

* Fix Giphy name

On their website it's spelled GIPHY.
2019-05-27 21:04:15 -04:00
PredaaA
b4f4e080af [core_commands] Using humanize_timedelta for [p]uptime command (#2735)
* Update core_commands.py
2019-05-27 20:39:36 -04:00
Flame442
132545e057 [Audio] Clarity changes for the API info commands (#2733)
* Clarity changes for the API info commands

* Remove unnecessary f-string
2019-05-27 20:27:56 -04:00
Michael H
68590dfdb8 [Core] Improve API token converter (#2692)
* improve api converter

* make usage more clear
2019-05-25 23:58:14 +02:00
Neuro Assassin
2e271d695b Add respectable aliases for consistency (#2731)
* Add respectable aliases for consistency

* General command name for alias.py

* Forgot one for alias

* General command for filter

* General command for warnings

* Whoops

Resolves #1749
2019-05-24 18:22:17 -04:00
Stonedestroyer
cd745d35c2 [Core] Add debug info command (#2728)
Shows useful debug information for debugging.
2019-05-24 17:55:48 -04:00
Flame442
6928e2aca2 Fixes some issues with API help commands (#2729)
* Fixes some issues with `[p]streamset youtubekey/twitchtoken`

Lots of general formatting bugs and clarity issues.

* General formatting bugs and clarity issues
2019-05-24 17:52:43 -04:00
Kowlin
49e86614c5 Adding support for GitHub Funding (#2732)
(I'm lazy, I know I should use a fork... sorry <3)
2019-05-24 20:10:55 +02:00
jack1142
51dcf65fd7 [Downloader] Fix problem with copying directory tree. (#2690)
* fix(downloader): clear paths in `distutils.dir_util._path_created` before copying tree

fix #2685

* style(downloader): add comment about PR
2019-05-23 03:08:14 -04:00
Michael H
c6c0165214 [Help] Special case fixing for empty docstring (#2722)
Resolves #2415
2019-05-22 18:22:31 +10:00
PredaaA
342935de49 [Trivia] Remove bold on a box (#2716) 2019-05-21 17:50:51 -04:00
jack1142
ced5bb4631 docs(install): remove information about voice extra (#2717) 2019-05-21 17:49:25 -04:00
DiscordLiz
0a832cee9c [Utils] Allow functools.partial use with menu (#2720) 2019-05-21 16:52:44 -04:00
Brenden Campbell
1cfce8b72c Fix minor typo (#2713) 2019-05-20 13:24:05 -04:00
jack1142
cdcde26dfc [Setup] Fix: wrong var used for instance data in remove_instance (#2709) 2019-05-19 10:13:01 -04:00
Fixator10
1ffb79f852 [events] send help on BadUnionArgument exception (#2707)
* [events] send help on BadUnionArgument exception

* Update redbot/core/events.py

Co-Authored-By: Michael H <michael@michaelhall.tech>
2019-05-19 06:14:12 -04:00
Michael H
644aaf0c0e [Help] Continuing work and bug-fixes (#2676)
* [Help] Add settings for various things

  - Fixes a small issue in a previously not-exposed logic path
  - Fixes an issue with denied commands help invocation
  - Adds some global usage settings

* remove outdated comment

* improve intent of strings

* added punctuation

* Add DM forbidden handling

* use a slightly different method for shortening embed width specifically
2019-05-18 06:54:02 -04:00
Michael H
cdea03792d [Streams] Fix NameError (#2699)
- fixes #2696
 - My fault for just looking at the github diff and seeing the logic fix
 on this one, without verifying the name validity in surrounding
 context. (see my review in #2679)
2019-05-18 00:59:26 -08:00
Flame442
b190e7417e [Downloader] Adds ctx.typing() to [p]pipinstall (#2700) 2019-05-17 21:40:42 -04:00
zephyrkul
7dd3ff7c8d [Core] Strip commas in user input for load, reload, unload (#2693)
rstrip commas, closes #2695
2019-05-16 23:54:17 -04:00
palmtree5
21a253103e [V3 Streams] fix an issue with stream commands not dealing with reruns (#2679) 2019-05-16 22:28:26 -04:00
El Laggron
db3fb29b30 [docs] Fix typo (#2691) 2019-05-16 17:03:09 -04:00
Neuro Assassin
c5d2ae5831 Mention voice channel in [p]userinfo (#2680)
* Mention voice channels, due to new discord update

* Add ID part back in, as Discord doesn't have copy ID for it yet
2019-05-16 15:12:09 +02:00
jack1142
9d0ca00f89 [General]: shorten descriptions properly with disabled embeds in urban (#2684)
fix #2683
2019-05-16 02:06:46 -04:00
DevilXD
79e5d2c9d7 Fixed command doc formatting in code blocks (#2678) 2019-05-15 20:01:02 -04:00
Fixator10
3a62d392b4 [Mod] [p]names utilize consume-rest (#2675)
Currently, `[p]names` requires quotes, if "user" arg contains spaces
2019-05-15 10:33:10 -04:00
Michael H
f2858ea48c [Core] Fix update notification (#2677)
removes a problematic await
2019-05-15 16:31:00 +02:00
Michael H
3c78fb420b [Help] Fixes some issues with fuzzy help (#2674)
* Fixes some issues with fuzzy help

 - also cleans up some name shadowing which wasn't causing issues
 (curently)

* ver

* style
2019-05-14 23:52:06 -07:00
Michael H
2d22ee7ccc 🎉 (#2673) 2019-05-14 21:30:52 -08:00
Michael H
9a243a1454 [Utils] Tools for marking things unsafe for general use (#2326)
* Tools for marking things unsafe for general use

* I'm facepalming so much...

Actually, make the two do something different 
instead of getting distracted writing different docs for both based on intended usage.

* local scopes mmkay + tests

* Move file to adress feedback

* typo fix

* Update __init__.py

* Fix issue with exported names in __init__

* changelog
2019-05-14 20:56:41 -07:00
Will
165e40c0db [Mongo] Unescape dict keys when rebuild (#2671)
* Unescape dict keys when rebuilding

* update pipfile

* Really update pipfile now
2019-05-14 23:50:51 -04:00
Michael H
7f1c2b475b [Core] Help Redesign (#2628)
* [Bot] Support new design

* [Context] use the new help in `ctx.send_help`

* [Commands] Update Cog and Group for help compat

- Removes a trap with all_commands, this isn't a good way to check this
- Adds a help property
- Fixes command parsing in invoke

* Redesigns red's help

* handle fuzzy help

* style

* handle a specific ugly hidden interaction

* fix bot-wide help grouping

* changelog

* remove no longer needed -
2019-05-14 20:49:51 -07:00
palmtree5
a5f38fa6e6 Add my 3.1 contributions (#2670) 2019-05-14 19:38:18 -08:00
Michael H
598968bf74 [Audio] Lavalink jar bump (#2669) 2019-05-14 20:35:09 -07:00
Will
ee661b0a9f [Docs] Add release notes for major functionality changes and instructions (#2668)
* Add release notes for major functionality changes and instructions

* Update docs/changelog_3_1_0.rst

Co-Authored-By: Michael H <michael@michaelhall.tech>
2019-05-14 20:30:17 -07:00
Michael H
7d7b3413bc Add contributions to changelog (#2666)
* Put some stuff in the changelog

* explicit note on d.py ver
2019-05-14 23:07:22 -04:00
Flame442
7400008384 Adds [p]datapath to print the bot's data path (#2652)
* Add `[p]datapath` to print the bot's datapath

* Adds 2652
2019-05-14 01:05:52 -04:00
TrustyJAID
4e564e8ce4 [V3 Economy] lookup users from the guild instead of using stored names (#2637)
* [V3 Economy] lookup users from the guild instead of using stored names

* Make user ID only appear when owner calls the leaderboard and the user is not in the guild also black formatting

* Slight optimizations in formatting and fix error when no banks exist
2019-05-14 00:52:08 -04:00
aikaterna
8691fdc533 [Docs] Update Mac install instructions for Java (#2663) 2019-05-14 06:46:30 +02:00
Flame442
7d103f1d32 [Docs] Typo fix (#2658) 2019-05-14 00:34:19 -04:00
Kowlin
3de1a265ea [Core] Added co-owners to outdated message warnings (#2664)
* Added co-owners to potentially DMd users

* Fetch the cached of every guild, see comments of #2664

* Ensure owners can be DM'd.

* Refactoring try block.
2019-05-14 00:33:05 -04:00
entchen66
3b6d4d9df6 [Cleanup] Fix for 3.1 (#2661)
cleanup before use get_message wich isn't possible anymore in dp 1.0.1. so I changed it to fetch_message
2019-05-13 05:39:28 -04:00
Michael H
e96e5374b4 Update intershpinx refs (#2660) 2019-05-13 12:02:57 +10:00
Toby Harradine
5c91709ac8 Remove vendoring note in README 2019-05-10 10:34:17 +10:00
NIXC
96a91b9d0e [Audio] Add ability to skip to a specified track by number (#2584)
* add skip to track functionality

* formatting

* Change some strings

* missing return, variable naming

* add variable names for translations

* change handling of skipping 1 track

* minor semantic adjustments

skiptotrack -> skip_to_track
2019-05-08 01:34:37 -04:00
aikaterna
65b88c09fb [Audio] Update for Red-Lavalink 0.3.x (#2547)
* [Audio] Update for Red-Lavalink #55

* Update setup.cfg

* Catch all the exceptions

* Update version range on Red-Lavalink

* Catch excepts on Spotify tracks/playlist upload

* No prefix needed
2019-05-08 00:56:40 -04:00
Flame442
80ff07f53d [Core] Fix two typos in API Token Converter (#2650) 2019-05-07 16:12:08 -04:00
Flame442
4f6485d1f9 [i18n] Changes default locale value from en to en-US (#2642)
* Changes default locale value to `en-US`

* Added this PR

Also fixed slight inconsistency in what is in a code block (if this is merged)
2019-05-06 12:19:57 -04:00
Flame442
d1c903f36f Fix grammar mistake by changing "to large" to "too large" (#2646) 2019-05-06 12:18:57 -04:00
Kowlin
516ebcfa2b Fixed missing imports. (#2643)
* Added changelog

* Fixed missing imports.
2019-05-03 10:22:06 -04:00
Kowlin
9414de24d4 [Mod] Added voice kicking. (#2639)
* Added voice kicking.

* Reversed exceptions.

* Lets use a check that works for this task 👀

* Update abc.py

* Black formatting
2019-05-03 10:08:25 -04:00
Michael H
16990071cb [V3 core] on_message_without_command dispatch (#2338)
* conveinience and performance addition with new dispatch

* I promise, I read the specs first.

* Really, I read the fucking specs.
2019-05-02 16:25:35 -04:00
James
52433d253f String format failure when set invoked without subcommand (#2638) 2019-05-02 15:44:33 -04:00
Will
bb6327d969 [Audio] Fix architecture blacklisting (#2634) 2019-04-30 12:32:16 -04:00
Toby Harradine
476f441c9b [Audio] Refactor internal Lavalink server management (#2495)
* Refactor internal Lavalink server management

Killing many birds with one stone here.
- Made server manager into class-based API with two public methods: `start()` and `shutdown()`. Must be re-instantiated each time it is restarted.
- Using V3 universal Lavalink.jar hosted on Cog-Creators/Lavalink-Jars repository.
- Uses output of `java -jar Lavalink.jar --version` to check if a new jar needs to be downloaded.
- `ServerManager.start()` won't return until server is ready, i.e. when "Started Launcher in X seconds" message is printed to STDOUT.
- `shlex.quote()` is used so spaces in path to Lavalink.jar don't cause issues.
- Enabling external Lavalink will cause internal server to be terminated.
- Disabling internal Lavalink will no longer reset settings in config - instead, hard-coded values will be used when connecting to an internal server.
- Internal server will now run both WS and REST servers on port 2333, meaning one less port will need to be taken up.
- Now using `asyncio.subprocess` module so waiting on and reading from subprocesses can be done asynchronously.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Don't use shlex.quote on Windows

Signed-off-by: Toby <tobyharradine@gmail.com>

* Don't use shlex.quote at all

I misread a note in the python docs and assumed it was best to use it. Turns out the note only applies to `asyncio.create_subprocess_shell`.

Signed-off-by: Toby <tobyharradine@gmail.com>

* Missed the port on the rebase

* Ignore invalid architectures and inform users when commands are used.

* Style fix
2019-04-29 21:31:28 -04:00
Neuro Assassin
c79b5e6179 [Core Commands] Add patch for invalid path with [p]backup (#2626)
* Add patch
2019-04-29 19:38:36 -04:00
aikaterna
c1bee3fee5 [V3 Audio] Add settable path for external Lavalink (#2480) 2019-04-29 18:34:09 -04:00
aikaterna
d786103d8d [Audio] Set cwd for localtracks on playlist start (#2534) 2019-04-29 18:28:44 -04:00
Neuro Assassin
b3850f6bb7 [Cleanup] Add [p]cleanup between (#2617)
* Add `[p]cleanup between`

At the moment, only deletes the messages in between, does not delete the messages specified when running the command.

* Create converter for message IDs; remove f-strings; use converters in a few extra commands

* Sacrifice to the style gods
2019-04-29 15:55:23 -04:00
PredaaA
e3db3c0341 [Core_commands] Fix some missing i18n strings (#2631)
* Update core_commands.py

* Update core_commands.py
2019-04-29 15:21:58 -04:00
jack1142
1ce3bc2870 [Downloader] Suppress commands.ExtensionNotLoaded for bot.unload_extension() call (#2625)
fix(downloader): suppress `commands.ExtensionNotLoaded` for `bot.unload_extension()` call (#2625)
2019-04-29 12:42:36 -04:00
jack1142
24ac111782 [V3 Downloader] Allow to specify minimum and maximum bot version in info.json (#2605)
* feat(downloader): add `min_bot_version` and `max_bot_version`

Adds actually working way of specifying minimum and maximum bot version and removes not working
`bot_version`

BREAKING CHANGE: - removal of `bot_version` attribute in `Installable`

* test(downloader): `Installable` tests fix for new bot version attributes

* docs(changelog): added changelog entries for this PR
2019-04-29 12:33:49 -04:00
Flame442
07f127ffe4 [Docs] Changelog entries for contributions by Flame (#2627) 2019-04-29 12:06:02 -04:00
Will
c58f566047 [CustomCom] Update command generator to work with dpy update (#2616)
* I think this works?

* Let's do it

Co-Authored-By: tekulvw <tekulvw@users.noreply.github.com>
2019-04-25 12:31:58 -04:00
Tyler Adam
f28d6dff32 [Streams] Add ability to exclude rerun streams from alerts (#2620)
* [Streams] Add ability to exclude rerun streams from alerts

* [Docs] Changelog entries for contributions by EgonSpengler

* Changelog entry for #2620 [Streams] Ignore Reruns In Alerts
2019-04-25 11:58:58 -04:00
Neuro Assassin
7e49ce9a7b [Mod] Remove error when unbanning an unknown user (#2619)
Fix for #2542
2019-04-25 11:57:26 -04:00
Will
59115cd1c7 [Commands] Fix built in check decorator order affecting permissions (#2621)
OOOoooooOOOoOOOooOoOOOOoooo
2019-04-25 11:51:02 -04:00
PredaaA
1d93fe4cf9 Update changelog_3_1_0.rst (#2615) 2019-04-25 05:44:34 +02:00
aikaterna
3f1f7640cb [Docs] Changelog entries for contributions by aikaterna (#2614) 2019-04-24 20:55:32 -04:00
TrustyJAID
83ee7c5e92 [V3 Dev] Fix repl command sanitize api keys (#2613) 2019-04-24 20:54:50 -04:00
jack1142
b95ddf18ba [Docs] Changelog entries for contributions by jack1142 (#2612)
* docs(changelog): [Mod] Allow admin to choose amount of repeats for "deleterepeats" #2437

* docs(changelog): Spelling correction of method name in Tunnel #2496

* docs(changelog): Tunnel fix - When tunnel closes, message should be sent to other end #2507

* docs(changelog): [V3 Downloader] Tell user how to load the cog after [p]cog install #2523

* docs(changelog): [V3 Audio] If bot has move members perm, it can join to user-limited channels #2525

* docs(changelog): [Trivia] Fix of dead image link (world flags) #2540

* docs(changelog): [V3 Test] Make sure that trivia test will use utf-8 encoding #2565

* docs(changelog): [V3 Core] Print actual version, when `--version` flag is used #2567

* docs(changelog): [V3 Downloader] Stop including subpackages in cog list #2590

* docs(changelog): [V3 Downloader] Uninstall multiple cogs #2592

* docs(changelog): [V3 Downloader] Always remove cog from installed in `[p]cog uninstall` #2595
2019-04-24 20:06:51 -04:00
Will
61d255726c [Docs] Add initial changelog document (#2611)
* Add initial changelog document

* add initial links

* oops
2019-04-24 17:08:55 -04:00
Will
05e2851c67 [Config] Migrate UUID for JSON backend (#2604)
* Migrate UUID for JSON backend

* Interesting...

* black

* Simplify UUID creation
2019-04-24 16:03:27 -04:00
Will
f20a174038 Fix the check to raise the correct message (#2603) 2019-04-24 21:24:31 +02:00
Michael H
ec108e7c02 [Alias] cleanup issues missed with #2587 (#2610) 2019-04-24 11:43:47 -04:00
Michael H
ad114295e7 Discord.py dep update 3.1 (#2587)
* Dependency update

discord.py==1.0.1
websockets<7

[style]
black==19.3b0

[Docs]
jinja==2.10.1
urllib3==1.24.2

Changes related to breaking changes from discord.py have also been made
to match

As of this commit, help formatter is back to discord.py's default
2019-04-23 21:40:38 -04:00
aikaterna
0ff7259bc3 [Audio] DJ role should ask for a role (#2606) 2019-04-23 18:41:46 -04:00
TrustyJAID
49af94334e Add Central API Key Documentation (#2574) 2019-04-23 23:51:37 +02:00
Flame442
22c318fda3 [Core] Adds a check to [p]set locale (#2553)
* Adds a check to [p]set locale

Fixes #2552
I would like a little bit of feedback on this change.
- Right now, `locale_name` is case sensitive. Should that remain case sensitive or should I allow it to accept it case insensitively?
- I made the invalid locale string an i18n string, however I don't know the process for how those are supposed to be made or if that will break anything. Should that remain an i18n string or should I make it a normal string?

* Case insensitivity and explicit en-US

-`[p]set locale` is now case insensitive
-`en-US` added to `[p]listlocales` instead of only existing in `[p]set locale`'s help text

* Remove spacing
2019-04-23 17:43:50 -04:00
jack1142
da5fd7699e [V3 Downloader] Always remove cog from installed when using cog uninstall (#2595) 2019-04-23 14:26:16 -04:00
Michael H
3d498a74ba [Docs] Update docs for redbot.core.humanize_list (#2598)
closes #2546
2019-04-23 14:16:15 -04:00
jack1142
460b4bb3f2 [Mod] Allow admins to choose amount of repeats for "deleterepeats" (#2437)
* feat(mod): configurable amount of repeats for "deleterepeats"

resolves #2267

* fix(mod): check user input instead of changing it if it's invalid

* fix(mod): only purge cache when argument is valid

* perf(mod): fetch repeats from config only when guild not in cache
2019-04-23 10:01:20 -04:00
Tyler Adam
47723cee33 [Mod] make [p]ban days parameter optional as per the doc (#2602) 2019-04-23 09:45:28 -04:00
Tyler Adam
a1b03be27e Add support for custom stream alert messages per guild (#2600) 2019-04-23 02:57:46 -08:00
Michael H
012d99c05c [Utils] Better error handling for humanize_list (#2597) 2019-04-22 22:34:38 -04:00
jack1142
2c8a425f87 [V3 Downloader] Uninstall multiple cogs (#2592)
* feat(downloader): Uninstall multiple cogs

* refactor(downloader): Put everything in one message
2019-04-22 20:17:30 -04:00
Flame442
8555f8c28c [Downloader] Pretties up the output when libraries fail to install (#2576)
* Pretties up the output when libraries fail to install

* Stupid double quote bullshit

* Added jack1142's suggestion

* I will never satisfy the eldritch being named black
2019-04-22 20:15:26 -04:00
jack1142
46413c2c52 [V3 Downloader] Stop including subpackages in cog list (#2590)
Before this change, `Repo.available_modules` would also contain subpackages, which is unintended
2019-04-22 20:07:52 -04:00
TrustyJAID
eaeaf9dd69 [V3 Streams] Change twitch and youtube top level commands (#2479) 2019-04-22 20:06:50 -04:00
zephyrkul
ee11d7da63 [V3 Audio] Cancel emptydisconnect when no longer alone (#2519)
* [audio] cancel disconnect when no longer alone

* [audio] fix modifying while iterating
2019-04-22 20:05:37 -04:00
NIXC
0ac93aacd5 [V3 Economy] Add default cooldown to slots (#2561)
* Add default cooldown to slots

To prevent abuse

* slight boost in time

1 second actually doesn't help, needs a bit more.
2019-04-22 19:44:05 -04:00
TrustyJAID
691d8af26d [V3 Warnings] Utilize modlog cases (#2471)
* [V3 Warnings] Utilize modlog cases

This update utilizes modlog cases for warnings and slightly improves usage of custom warnings if enabled.

* remove BadArgument error response

* Utilize Optional and consume-rest for points and reason

* black format

* Remove unnecessary imports, cleanup error handling, and improve docstrings
2019-04-22 19:34:36 -04:00
TrustyJAID
87c66b2423 [V3 Admin] Fix errors when hierarchy issues are raised (#2498)
* Fix addrole mentioning who we're trying to add the role to

* More things are broken, huh

* formatting...
2019-04-22 19:25:44 -04:00
aikaterna
005123a371 [Audio] Fix for playlist queue when not playing (#2586) 2019-04-22 19:17:44 -04:00
aikaterna
bb8ce43cc0 [Audio] Track search and append fixes (#2591)
* [Audio] Track search and append fixes

* Appeasing the style gods
2019-04-22 19:17:17 -04:00
palmtree5
13611e34d2 Fix extras in launcher (#2588)
Now non-existent voice extra was still hanging around in the launcher while the style extra was never added in
2019-04-22 14:46:07 -08:00
Neuro Assassin
b8190c44a8 [Dev] Sanitize API tokens in debug and eval (#2585)
* Sanitize API tokens in debug and eval

* Not sure what happened there
2019-04-22 18:43:02 -04:00
Will
95d5ec5f0e [Setup] Fix the mongo name to create instances using new driver (#2594)
* oops

* damn you
2019-04-22 18:33:52 -04:00
zephyrkul
874204bf18 [mongo setup] utilize getpass (#2593) 2019-04-21 07:04:08 -08:00
Will
6c296a9a17 [V3 Setup] Overhaul backend conversion process through setup scripts (#2579)
* swap to click for setup

* Initial changes

* expose some stuff to allow for per-driver optimizations

* overwrite base config

* add red log

* add one print juuuust in case

* fix this

* thanks kowlin

* damn

* oops

* fix thing

* partial commit

* Working mongo -> json conversion, it sucks tho

* remove unused line

* Wrote initial optimized json importer

* optimized json importer

* remove useless line

* update mongo to json converter

* lets try writing the correct entry

* oops

* style fix

* add some garbage data filters going from old mongo to json

* ignore garbage data in mongov2 conversions

* simplify code a bit and add a completion message

* missed one

* Update pipfile lock

* Lock click version
2019-04-20 20:10:44 -04:00
PredaaA
ad06b0e723 [Audio] Fix issue on audiostats command when more than 20 servers to display (#2533)
* Update audio.py

* Fix of pages counter.
2019-04-18 12:12:16 -04:00
Will
0652dd344b [V3 Mongo] Correct dictionary rebuilding process for global all case (#2581) 2019-04-13 15:51:49 -04:00
Will
8b3c3e89e9 [V3 Mongo] Fix all behavior (#2580) 2019-04-13 15:24:50 -04:00
Will
c82ac5ae68 Add some errors for backend conversions and only allow MongoV2 creation (#2570)
* Add some errors for conversions and only allow mongoV2 creation

* Add another message

* Fixed message to be more clear
2019-04-10 20:42:28 -04:00
jack1142
2776db0cf9 [V3 Core] Print actual version, when version flag is used (#2567) 2019-04-10 19:32:20 -04:00
Will
ba19179e4f [V3 Config] Record custom group information using cog_add event (#2550)
* Do things differently

* Uncomment critical lines

* Reduce, reuse, recycle

* Check groups on all new config objects after a cog loads

* I don't know why this is failing now or why we need the global keyword

* gotta fix this too
2019-04-09 22:02:50 -04:00
jack1142
e347ffa336 Bot can join voice channel with user limit if it has move members perm (#2525) 2019-04-09 20:33:19 -04:00
kennnyshiwa
c85af62401 Fix message when user hits max credits (#2563)
* Fix message when user hits max credits

Fixes the error message when a users issues the payday command when having max credits

* Update economy.py

Changed message when user hits max payday and bank is global to match message when bank is per server

* Update economy.py

made statements match
2019-04-09 18:54:44 -04:00
aikaterna
39b64b7570 [Audio] Fix for localtrack playing (#2557) 2019-04-09 17:13:57 -04:00
aikaterna
56b220b92e [Audio] Fix for prev command display (#2556) 2019-04-09 17:10:25 -04:00
jack1142
972fbecc94 [V3 Trivia] Make sure that test will use utf-8 encoding (#2565) 2019-04-09 17:03:34 -04:00
Michael H
136e781c7f Kill DataConverter (#2554)
* Kill DataConverter

* remove the tests
2019-04-09 17:01:04 -04:00
Will
0852d1be9f [V3 Config] Require custom group initialization before usage (#2545)
* Require custom group initialization before usage and write that data to disk

* Style

* add tests

* remove custom info update method from drivers

* clean up remnant

* Turn config objects into a singleton to deal with custom group identifiers

* Fix dumbassery

* Stupid stupid stupid
2019-04-04 21:47:08 -04:00
Will
fb722c79be [V3 ModLog] Change register_casetypes behavior (#2551)
* Ignore runtime error in register_casetypes

* Fix documentation
2019-04-04 18:59:14 -04:00
jack1142
c63d069f69 [Trivia] Fix of dead image link (world flags) (#2540)
* New image link for Sao Tome and Principe

Current link is dead

* Someone didn't pay attention on geography lessons
2019-04-03 11:40:20 -04:00
Will
1cd7e41f33 [V3 Config] Update Mongo document organization to bypass doc size restriction (#2536)
* modify config to use identifier data class and update json driver

* move identifier data attributes into read only properties

* Update mongo get and set methods

* Update get/set to use UUID separately, make clear work

* Remove not implemented and fix get_raw

* Update remaining untouched get/set/clear

* Fix get_raw

* Finally fix get_raw and set_raw

* style

* This is better

* Sorry guys

* Update get behavior to handle "all" calls as expected

* style again

* Why do you do this to me

* style once more

* Update mongo schema
2019-04-03 09:04:47 -04:00
zephyrkul
d6d6d14977 [V3 Alias] Customize Parameters (#2455)
* [alias] custom parameters

Signed-off-by: zephyrkul <zephyrkul@users.noreply.github.com>

* [alias] quoted words remain quoted

Signed-off-by: zephyrkul <zephyrkul@users.noreply.github.com>

* [alias] fix no-parameter aliases

Signed-off-by: zephyrkul <zephyrkul@users.noreply.github.com>

* [alias] remove unneeded error dispatch

it was expensive and did nothing anyway from my own testing
2019-04-02 23:08:28 -04:00
PredaaA
82cda4b57a Delete cooldown messages when expired (#2469) 2019-04-02 23:06:30 -04:00
Toby Harradine
301c800319 Logging enhancements and cleanup (#2502)
* Logging enhancements and cleanup

- Removed debug log messages every time `Config.get_conf` is used or a JSON file is read/saved. The basic configuration is now logged once with DEBUG when the bot starts up instead.
- Changed logging output format to reverse date order, include seconds, and use the logger's name instead of the module, function and line number.
- Log files are now kept in the `DATAPATH/core/logs` directory. Each time Red is restarted, a new log is created, and the old ones renamed in a rotating fashion. There can be a maximum of 9 logs in total.
- Each log file now has a smaller max size of 500KB before it will be split into multiple parts. There are also a maximum of 9 parts of each log.
- Discord.py logger now uses the same output formatter as red's loggers
- Moved logging setup code into `redbot.logging` module.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Reformat

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Implement discussed changes

- We maintain a red.log over multiple runtimes, alongside a latest.log and previous.log for individual runtimes.
- Naming convention changed a bit. E.g. when latest.log is just one part, it will be named latest.log. When it becomes two parts, they will both be named latest-part1.log and latest-part2.log.
- Rotation direction is reversed. This means as the files end up being named in chronological order.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-04-02 22:58:34 -04:00
DiscordLiz
30af83aa6a [Permissions] Allow for multiple IDs in permissions rule commands. (#2448)
Use `commands.Greedy` to apply multiple rules at once.

closes #2214
2019-04-02 22:53:07 -04:00
jack1142
0f9501f93a Tunnel - Send message after close (#2507) 2019-04-02 22:50:01 -04:00
Michael H
466b2b82d0 Fix localwhitelist/localblacklist add/remove (#2531) 2019-04-02 22:46:12 -04:00
Michael H
8ab39512d9 [Filter] Performance increases. (#2509)
* [Filter] Performance increases.

The filter was already using re to split words, this just does the entire search in re instead.

A further improvement to this would cache patterns used and update them if the wordlist changes.

* Add a pattern cache

* exit on no-words

* formatting pass

* keep the return type consistent, even though this doesnt break core since this is available to cogs

* ...

* Quit being an idiot

* Slight further improvements, a fix, and restructure

Moved actual set creation out of the inner portion.
Reduced config lookups in case of no filter.
Fixed channel wordlist fetching.

* I really should go back to using a pre-commit hook for the style stuff
2019-04-02 22:42:13 -04:00
jack1142
e08e95c04e [V3 Downloader] Tell user how to load the cog after [p]cog install (#2523)
* tell user how to load the cog after install

* use code block
2019-04-02 22:35:21 -04:00
FixedThink
e7b1fa5ab5 [V3 Trivia] Update "World" trivias to reflect legislative changes (#2526)
* Update worldmap.yaml

* Update worldflags.yaml

* Update worldcapitals.yaml
2019-04-02 22:33:40 -04:00
Flame442
14a2f98418 [Docs] Adds self recommendation to cog_data_path (#2539)
This change adds the help text of "If calling from a command or method of your cog, this should be self." from `bundled_data_path` to `cog_data_path`. This bit of text can help people who are unsure of what a "cog instance" is to understand how to use `cog_data_path`.
2019-04-02 22:24:20 -04:00
aikaterna
de7d08ee75 [Audio] Match v2 behavior for channel change (#2521)
* [Audio] Match v2 behavior for channel change

* Use move_to instead of connect
2019-04-02 22:22:57 -04:00
aikaterna
2a486cad66 [V3 Audio] Playlist info improvements (#2274)
* [V3 Audio] Playlist info improvements

* Add pagify import, reformat for Black

* Change from code block to embed with links
2019-04-02 21:48:21 -04:00
aikaterna
80fc639480 [V3 Audio] Queue clean and queue clear addition (#2476)
* [V3 Audio] Queue clean and queue clear addition

* Use DJ role and existing checks inst. of mod/admin

* Remove unneeded .format()
2019-04-02 21:12:55 -04:00
Michael H
c7608aeb17 [V3 Mod] Use a composite class for mod (#2501)
* [V3 Mod] Use a composite class for mod

This turns mod.py into acomposite class

I've split things in this up based on purpose, including `movetocore`

`movetocore` is a set of things which likely belong in the core bot and
not relying on mod being loaded.

This is part of #2500

Per discussion in discord, this should be the first thing in #2500
merged

* Move this back,
mod was importable,
and this was intended as non-breaking

* Prevent fix from being lost if merged before this.

see Cog-Creators/Red-DiscordBot#2510

* Move case creation to before sending

see #2515

* fix failed merge done in web
2019-04-01 03:34:27 -08:00
aikaterna
050300040c [V3 Audio] Add Spotify support (#2328)
* [V3 Audio] Add Spotify support

* [V3 Audio] Update LICENSE

* Appeasing the style gods

* Extra word removal on LICENSE

* Update for #2389

Thanks to TrustyJAID for the help.

* Playlist command support for Spotify URLs or codes

* Add exception for dc while loading Spotify tracks

* Allow Spotify urls by default in audioset restrict

Matches the behavior of Spotify codes already being allowed by default.

* Update audio.py

* .format() moving

* Added a character to try to make Travis behave
2019-03-28 13:41:17 -04:00
aikaterna
94c3a2fedd [Audio] Seek command can now seek to position (#2470)
- Seek can now seek to a specific position, formatted like 00:00:00 or 00:00. Using negative or positive ints still functions the same as previously and will seek ahead or behind by that value instead.
- This PR requires the `_time_convert` func added in #2465 and should be merged after that one.
2019-03-10 18:27:23 +11:00
aikaterna
421043d923 [Audio] Fix for audioset status (#2481)
Revert player.is_playing check added to the playing players list for audioset status in #2473. This addition would cause no status to be shown when a local track was played and skip was used.
2019-03-08 09:09:22 +11:00
aikaterna
1c22b212c2 [Audio] Add songs when search-queuing (#2513)
Searching for a song and pressing the reaction to queue a song would not add the song to the queue if `[p]audioset maxlength` was off. This was an omission from #2465.
2019-03-07 14:12:15 +11:00
Flame442
d52b3eaf21 Proper capitalization of [p]blacklist help text (#2511) 2019-03-07 08:57:06 +11:00
Flame442
30ca226e39 [Trivia] Fix typo in warcraft trivia (#2508)
teh -> the
2019-03-06 20:04:11 +11:00
aikaterna
15037013e7 [Audio] Add option for dc at queue end (#2472)
This addition adds a toggle for having the bot instantly disconnect when the queue ends. It takes precedence over the `[p]audioset emptydisconnect` setting as it disconnects immediately when the queue or single song is finished.
2019-03-04 14:16:26 +11:00
jack1142
30fa9303e8 Spelling correction of method name in Tunnel (#2496)
`Tunnel.files_from_attatch` was misspelled.

Kept old name as an alias for backwards compatibility.
2019-03-04 12:19:40 +11:00
Toby Harradine
b4753a02de Fix translations of multiline strings (#2504)
* Fix translations of multiline strings

Resolves #2408.

Also did a few little optimisations here and there, we're no longer just using copied code from another project.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Reformat

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-03-04 00:45:15 +01:00
Toby Harradine
628073cbe1 Update Translations (#2486)
Also included a Makefile recipe which makes use of the Crowdin CLI's `crowdin download` command. This requires whoever is using it to provide the project's API key in an environment variable, but we may automate this at some point.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-03-04 08:55:01 +11:00
aikaterna
2755592175 [Audio] Playlist download addition (#2482)
Bot owners can use `[p]playlist download playlistname` to download a playlist file that is compatible with the playlist upload command. Songs can also be exported for v2 use by using `[p]playlist download playlistname True`, which strips out tracks besides YouTube or Soundcloud URLs.
2019-03-03 14:29:42 +11:00
entchen66
6051ccb23c [Filter] Dispatch event on_filter_message_delete (#2483) 2019-02-27 16:27:10 +11:00
El Laggron
46f9cae0ef [Audio] Sort local files (#2358) 2019-02-27 16:22:10 +11:00
Seputaes
16614168a7 [Downloader] Install SHARED_LIBRARY requirements (#2384)
SHARED_LIBRARY Installable types did not have the requirements as
defined in info.json automatically installed. This change updates the
installation of libraries to also install their requirements.

Resolves #2381
2019-02-27 16:07:05 +11:00
El Laggron
5a15939f08 Bump aiohttp-json-rpc to version 0.12.1 (#2489) 2019-02-27 09:55:20 +11:00
Toby Harradine
bb5aab16c9 [Permissions] Exclude @everyone role when retrieving rules (#2484)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-02-25 10:19:00 +11:00
Toby Harradine
b38ac1d025 Bump version to 3.0.2
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-02-25 08:54:50 +11:00
Toby Harradine
22cf8e940c [Permissions] Fix typo in cog_add event 2019-02-25 08:27:49 +11:00
aikaterna
b0ab6bd7e2 [Audio] Add track length restriction (#2465)
* Added `[p]audioset maxlength`, which takes seconds or 00:00-style of formatted input for restricting the player to songs that have a length under that threshold.
2019-02-24 11:44:58 +11:00
aikaterna
7b9d85c1b5 [Audio] Emptydisconnect and status refactor (#2473)
- Refactored disconnect_timer, the function behind audioset emptydisconnect, to be more appropriately responsive (thanks to TrustyJAID)
- Refactored status clearing/status changing when emptydisconnect or other Lavalink player statuses would have a TRACK_END event but no QUEUE_END event. This should clear or modify the bot's status event appropriately when [p]audioset status is on and the bot disconnects due to emptydisconnect and ideally play a little nicer with other cogs that set statuses.
2019-02-23 08:45:01 +11:00
DiscordLiz
3637804929 Fix Command.error decorator (#2478)
This shouldn't be a coroutine.
2019-02-23 07:13:22 +11:00
DiscordLiz
c70a44e0fe Make on_command_error recognise custom error handlers (#2458)
Adds detection of custom error handlers to the global error handler.

Adds documentation of the updated behaviour.

Closes #2276.
2019-02-22 20:12:00 +11:00
Toby Harradine
cf18b601e2 [Mod] Use consume-rest in [p]casesfor 2019-02-22 17:52:30 +11:00
Lionir
139cc07bda Resolve network issue due to certificate failure (#2442)
There seems to have been a recurring problem with certificates on Macs, this is how you solve it *apparently*. 😎
2019-02-22 06:24:39 +01:00
DiscordLiz
619c3f28f7 fix case generation for cases which were not logged to modlog channel (#2477)
Add documentation for failure cases
Prevent an expected failure case.
2019-02-22 03:33:45 +01:00
DiscordLiz
9966668307 adds function to modlg API to get cases by member (#2453)
adds command using this to view all of a member's cases demonstrating this

closes #2266
2019-02-22 03:31:37 +01:00
palmtree5
77a0a67029 [Streams] Remove communities support (#2223)
See [this blog post](https://blog.twitch.tv/introducing-tags-and-new-categories-33744ef7b04f), communities on Twitch have been discontinued.
2019-02-21 17:37:28 +11:00
ZeLarpMaster
b65466cebd [Trivia] Fix typo in cars.yaml (#2475) 2019-02-21 09:49:43 +11:00
Toby Harradine
f1873e32d6 [Docs] Use correct perms cmd for setting default rules 2019-02-20 16:08:25 +11:00
Michael H
b7b4e65d2d [Permissions] Remove p alias (#2467)
People can re-add it with the alias cog, but core red should not monopolize short aliases.

What about those servers that want `[p]play` even shorter?
2019-02-19 10:43:02 +11:00
aikaterna
16bb334fba [Audio] Add playlist copy (#2205)
Bot owners can now copy playlists from one server to another using server IDs.
2019-02-19 10:36:20 +11:00
TrustyJAID
3f1d416526 Allow central storage of API keys (#2389)
This creates a central location to store external API tokens that can be used between cogs without requiring each cog to be loaded for it to work.

A new set option for `[p]set api` is created to assist in forming bot readable API token locations.

This also updates the Streams cog to utilize the central database.

Tokens are moved from the old data locations in core cogs on load.
2019-02-19 10:22:44 +11:00
Michael H
722aaa225b Improve Cooldown UX (#2412)
This improves the feedback given on `command_on_cool_down`, as well as automatically handling cooldowns under 1 second for the user.
2019-02-19 10:19:49 +11:00
aikaterna
7e2e37ab3f [Audio] Play local folders via text command (#2457)
`[p]local folder` will now accept folder names in the command instead of having to navigate through the reaction menu. Also added an alias of `[p]local start` to help users coming from v2 audio.
2019-02-19 10:16:41 +11:00
aikaterna
83411d0fa4 [Audio] Change pause to a toggle (#2461) 2019-02-19 10:10:11 +11:00
aikaterna
d608dd953b [Audio] Remove aliases (#2462) 2019-02-19 10:08:59 +11:00
Flame442
e5e0a024f9 Remove unnecessary "or" from Config doc (#2464) 2019-02-17 14:14:40 -09:00
Caleb Johnson
8e6db0829c [Audio] Connect to lavalink in the background (#2460)
Also:
- restart and reconnect if connection settings change
  - shutdown and restart if not configured to use external
- show a message in [p]play et al. when the connection hasn't been made
- move the JAR download to manager so audio.py can access it
- only start if no process exists
- bump red-lavalink to 0.2.3

Resolves #2306
2019-02-17 09:22:55 +11:00
Toby Harradine
5359fec195 Bump version to 3.0.1
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-02-16 12:21:25 +11:00
Toby Harradine
f2daf0be9a Revert "[Audio] Connect to lavalink in the background (#2335)" (#2459)
This reverts commit b633a33137.
2019-02-16 11:52:03 +11:00
Caleb Johnson
b633a33137 [Audio] Connect to lavalink in the background (#2335)
Also:
- restart and reconnect if connection settings change
  - shutdown and restart if not configured to use external
- show a message in [p]play et al. when the connection hasn't been made
- move the JAR download to manager so audio.py can access it
- only start if no process exists

Resolves #2306
2019-02-16 11:35:21 +11:00
Michael H
d13bf37845 [Utils] Add filters for spoiler markdown (#2401)
This also wraps some fields of the modlog with the same sanitization, as well as the `[p]names` command.
2019-02-16 11:34:38 +11:00
Michael H
4b831a634a [Audio] Remove players which no longer have a guild. (#2414)
Cleanup players when the bot has one for a guild it leaves.

Bumps Red-Lavalink to v0.2.2
2019-02-16 11:15:33 +11:00
DiscordLiz
f91e0a6546 Prevent error when ctx.send_interactive prompt is deleted (#2447)
Supress excpetions which may occur when attempting to delete a prompt.

fixes #2380
2019-02-16 07:46:36 +11:00
ZeLarpMaster
2e2d669fdf [Trivia] Fix typo in cars.yaml (#2456) 2019-02-16 07:39:49 +11:00
Toby Harradine
7ecdf7a7be Remove asyncio.Event creation from module level in Audio (#2454)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-02-15 14:27:01 +11:00
Twentysix
9b940de854 [Downloader] [p]pipinstall: Handle no args 2019-02-14 23:39:38 +01:00
zephyrkul
82807ffe69 [Downloader] Use shlex for subprocesses (#2421) 2019-02-14 23:32:11 +01:00
Toby Harradine
b1066ad58f Guard module-level creation of Config objects (#2449)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-02-14 15:36:48 +11:00
Caleb Johnson
ac8b1fc108 [Filter] Filter based on words for non-phrases (#2262)
Filters based strictly on words (ignoring punctuation) if filter entry isn't a phrase.
2019-02-13 14:14:12 +11:00
zephyrkul
820be2a0ae [Core] Utilize consume rest, Union (#2407) 2019-02-13 14:11:22 +11:00
Toby Harradine
9869f95bd6 Update dependencies and copyright year (#2436)
- aiohttp 3.5
- websockets 7
- Rapptz/discord.py@700dbb5
- A few others

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-02-13 10:49:11 +11:00
zephyrkul
c87286d3c6 [README] Update support channel (#2445) 2019-02-12 21:24:14 +01:00
Twentysix
7028ca9df3 [Docs] Link bot account guide (#2440) 2019-02-11 20:17:39 +01:00
Toby Harradine
435fc141ae Default rules for subcommands precede supercommands (#2422)
This incorporates default rules into the same resolution techniques used by concrete rules.

Resolves #2313.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-02-11 14:14:29 +11:00
Twentysix
889fa63aff Sentry removal (#2439)
Resolves #2430.
2019-02-11 11:19:02 +11:00
Toby Harradine
dae75521d3 [Audio] Enable logging on Lavalink V3 (#2438)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-02-10 18:36:02 +11:00
Toby Harradine
b9d440f2f7 Utilise setup.cfg, move version info to redbot package (#2411)
* Utilise setup.cfg, move version info to redbot package

- `redbot.__init__` now is safe to import without installing dependencies.
- Now deploying binary wheel distribution from travis
- Include locale files in sub-packages of cog packages
- python_requires now has no upper limit

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-02-09 12:08:22 +11:00
Toby Harradine
ec4c325efd Guard parsing of CLI args in launcher, setup scripts (#2432)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-02-08 18:08:10 +11:00
Twentysix
b350ac38dc Allow [p]info customization (#2417)
* Allow [p]info customization

* Style

* Naming
2019-02-08 02:38:26 +01:00
PredaaA
e88c82e7e0 Update help_formatter.py (#2431) 2019-02-08 02:24:59 +01:00
Twentysix
99ad01ae0d [p]userinfo: Handle target w/ 'None' Member.joined_at (#2426) 2019-02-07 22:40:40 +01:00
Toby Harradine
8f8c52d8c4 [Docs] Add note about pyenv optimisation flag (#2428)
Signed-off-by: Toby <tobyharradine@gmail.com>
2019-02-07 21:54:14 +11:00
Toby Harradine
c56fa5a320 Minor changes to install docs (#2427)
- When creating a venv, use `python3.7` instead of `python3`
- Remove unnecessary dependency from pyenv pre-requirements on Debian
- Use curl over wget for get-pip on Xenial

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-02-07 10:51:17 +11:00
Toby Harradine
7d5bae5a50 Use V2 of RTD's configuration file (#2418)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-02-07 10:30:01 +11:00
bobloy
7c404082f8 [Help] Group Fields respect page_char_limit (#2281)
It would groups the cogs until it is **greater** than the set `page_char_limit` in helpset. This leads to inconsistent page sizes when a large cog was appended to something barely under the limit.

I think this commit will reign in the weirdness by adjusting the secondary grouping to aim for **less than** `page_char_limit` grouping.
2019-02-06 18:59:54 +11:00
Toby Harradine
dc8e61cbe5 Always tick Voice requirements on startup screen (#2413)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-02-04 22:33:48 +11:00
zephyrkul
f2ebf52f6e Send help on empty [p]load/unload/reload (#2410)
Rather than attempting to load / reload / unload nothing, send command help on bare `[p]load`, etc. commands.
2019-02-04 17:39:03 +11:00
Redjumpman
fa223e22ed [Utils] Fix for MessagePredicate.lower_contained_in (#2399)
Added a missing str.lower() method when checking to see if the content is in the list.
2019-02-04 10:22:01 +11:00
PredaaA
6d22c8faa5 [Core cmds] [p]servers: handle message deletion (#2400) 2019-02-03 23:32:45 +01:00
Michael H
01ebf2835b Improve usability of warnings/unwarn\n resolves #2403 (#2404) 2019-02-03 02:37:01 -09:00
Michael H
3ef693a259 prevent traceback (#2406)
* prevent traceback related to  Rapptz/discord.py#1638

* formatting
2019-02-02 11:20:17 +01:00
Caleb Johnson
3a4d932d2b Use find_namespace_packages in setup.py (#2402) 2019-02-01 16:10:10 +11:00
Kowlin
571332ae18 Fixed our missing templates (#2398) 2019-01-31 10:36:14 +11:00
Toby Harradine
0607f5552a Use python-Levenshtein-wheels (#2393)
This removes the compiler detection logic in setup.py. python-Levenshtein-wheels includes pre-built wheels for virtually all operating systems and architectures we support.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-01-30 16:52:36 +11:00
Toby Harradine
016a6d3aa6 Bump minimum python version to 3.7.0 (#2394)
This is in anticipation of #2246, although I've written that PR to not break on 3.6, the feature itself is not usable on 3.6. So I think the best way forward is to simply require python 3.7. This also allows devs and cog creators to utilise all of the new features in 3.7, and it also updates the docs so all operating systems will have 3.7 installed.

Signed-off-by: Toby <tobyharradine@gmail.com>
2019-01-30 14:07:53 +11:00
Toby Harradine
c7d98f88e8 Update Travis badge in README to travis-ci.com (#2395)
Signed-off-by: Toby <tobyharradine@gmail.com>
2019-01-29 01:46:37 -09:00
Toby Harradine
b82756087a Merge V3/release/3.0.0 into V3/develop 2019-01-28 15:30:30 +11:00
Toby Harradine
91258fea78 Bump version to 3.0.0
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-01-28 14:52:14 +11:00
Toby Harradine
5c1c6e1f03 Remove version from help message
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-01-28 14:49:55 +11:00
Toby Harradine
6d5762d711 Move Red-Lavalink to main requirements
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-01-28 14:38:43 +11:00
Toby Harradine
05bef917ae Vendor discord.py (#2387)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-01-28 14:14:36 +11:00
Caleb Johnson
348277bcbd [Audio] Lavalink 3.0/3.1 compatibility updates (#2272)
- Update to red-lavalink v0.2.0 (blocked by Cog-Creators/Red-Lavalink#41)
- Force lavalink to use TLSv1.2 on java 11+ (blocked by #2270)

I would add equalizer support, but there's no way to know the full
Lavalink version and thus whether it's supported ahead of time.
2019-01-28 12:43:21 +11:00
El Laggron
3b62572c89 Graceful shutdown when SIGTERM is received (#2286)
Only works on Unix.
2019-01-23 10:28:30 +11:00
Iangit1
158c4f741b Grammar in ask_sentry and interactive_config (#2383) 2019-01-21 09:07:55 +11:00
bobloy
abcf179042 [CogManager] Fix return type-hint (#2319) 2019-01-19 11:47:58 +11:00
Michael H
3dba09d19d [Docs] Chocolately/PowerShell install instructions for Windows (#2364) 2019-01-19 11:45:22 +11:00
Michael H
1c4193cce2 [Permissions] Quick extra comment of importance (#2379) 2019-01-18 14:48:00 +11:00
Michael H
849ade6e58 Reconcile permission hooks with ctx.permission_state (#2375)
Resolves #2374.

See mod.py's voice mute for an example of why this may be necessary.
2019-01-18 14:45:34 +11:00
Toby Harradine
0d4e6a0865 Fix MongoDB to JSON migration and warn about Mongo driver (#2373)
Resolves #2372.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-01-18 11:26:33 +11:00
Toby Harradine
e07408161a Merge branch 'V3/release/3.0.0' into V3/develop
# Conflicts:
#	redbot/cogs/mod/mod.py
2019-01-11 16:42:42 +11:00
Toby Harradine
32bd47e105 Bump version to 3.0.0rc3.post1
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-01-11 13:09:40 +11:00
Toby Harradine
1bb5d698cc Make Travis only do py36 tox when deploying
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-01-11 13:04:00 +11:00
Toby Harradine
9752a9c719 Bump version to 3.0.0rc3 (#2367)
Also updated some dependencies, including discord.py.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-01-11 11:10:01 +11:00
Toby Harradine
7973babe4b Catch exceptions in [p]backup (#2363)
Resolves #2354.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-01-11 09:07:37 +11:00
Michael H
78e4b578e2 [Utils] Tunnel minor fixes (#2366)
- Tunnel uses a safe max size (Max size is related to maximum payload, not maximum file size)
  - Checks attachment sizes prior to download
2019-01-10 19:46:49 +11:00
Toby Harradine
8eb8848898 [Mod] Context-based voice checks (#2351)
- Removed `redbot.cogs.mod.checks` module
- Moved logic for formatting a user-friendly list of permissions to `redbot.core.utils.chat_formatting`
- `[p]voice(un)ban` and `[p](un)mute voice` now check permissions in the user's voice channel

Resolves #2296.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-01-10 11:35:37 +11:00
Toby Harradine
aac1460240 [Utils] Exit menu silently when message is deleted (#2344)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-01-10 11:33:38 +11:00
Toby Harradine
dde5582669 [CogManager] Removal of implicit paths and general cleanup (#2345)
- Removed memory-sided `CogManager._paths` attribute, as it has no practical use.
- `[p]removepath` now removes the actual path displayed with the index specified in `[p]paths`.
- New method for retreiving a deduplicated list of user-defined paths as `Path` objects
- General cleanup so we don't have to do so much head-scratching next time an issue arises here

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-01-06 11:02:58 +11:00
Twentysix
937d2fe0f6 [Mod] Enhanced [p]hackban (#2164) 2019-01-05 03:29:05 +01:00
Toby Harradine
aa854cf1f9 [CustomCom] Insert space before newline separating CC previews (#2350)
Resolves #2295.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-12-29 16:54:32 +01:00
Toby Harradine
2bd05a5a04 Fix JSON to Mongo migration (#2346)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-12-29 10:51:31 +11:00
palmtree5
bcc50557a9 [V3 Readme] Update cog list links (#2347) 2018-12-23 00:17:20 -09:00
Toby Harradine
3a8da1f82b [Cleanup] Fix cleanup after
Resolves #2343.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-12-22 09:19:25 +11:00
Toby Harradine
bdcb69ad37 Merge branch 'V3/release/3.0.0' into V3/develop
# Conflicts:
#	redbot/cogs/audio/audio.py
2018-12-21 13:37:32 +11:00
Toby Harradine
811634a2b0 [Permissions] Help menu respects rules (#2339)
Resolves #2249.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-12-21 13:30:13 +11:00
Toby Harradine
2512320b30 [DataManager] Don't copy bundled data to cog data folder (#2342)
- `load_bundled_data` is now deprecated and obselete
- Bundled data is now no longer copied to the cog's data folder, greatly simplifying its operations under the hood. Instead, `bundled_data_path` will now return the path to the folder from which the files would have previously been copied.

Resolves #2329.

Resolves #2280.
2018-12-21 13:26:00 +11:00
Michael H
db03faf042 Make webhooks automod immune (#2337)
Resolves #2336.
2018-12-21 11:43:46 +11:00
Toby Harradine
701259158f [Permissions] Always respect default rules (#2341)
Resolves #2340.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-12-21 10:35:17 +11:00
Kowlin
a5efdc6492 [Mod] Handle invalid nicknames in [p]rename (#2311) 2018-12-16 11:21:36 +11:00
Kowlin
38b15ded87 [Mod] Fixed loud RuntimeError on modlog cases (#2331) 2018-12-16 10:26:48 +11:00
Michael H
351749dff6 [Permissions] Find things uniquely for models (#2258)
This is a safety measure to prevent accidentally passing a model which has the same name as another model, potentially modifying rules for the unwanted one.
2018-12-16 10:09:18 +11:00
Michael H
2d9912cea7 prevent locking out owner (#2317) 2018-12-13 18:38:03 +01:00
aikaterna
3b50ed8192 [V3 Audio] Restrict toggle for commercial sites (#2245)
* [V3 Audio] Restrict toggle for commercial sites

* Different url parsing

* Allow local tracks

* No self needed

* Change Twitch url
2018-12-13 18:31:24 +01:00
NNTin
c4ab34a049 V3: regex extension on java -version (#2316)
* regex extension on java -version

* make it a non capturing group

* alphanumeric matching

* Match specification: Style, line length

* Update manager.py
2018-12-13 18:28:00 +01:00
Michael H
985e7b3c6d swap unsafe yaml.load usage for yaml.safe_load (#2324)
Related to #2323

Recommend additionally adding a step in CI
ensuring use of `yaml.load` is prevented from existing in the code base.
2018-12-13 18:19:27 +01:00
palmtree5
7546c50226 [Streams] Toggle mentions on for roles being alerted (#2252)
Resolves #1831.
2018-11-24 10:46:38 +11:00
aikaterna
6435f6b882 [Audio] Match openJDK 11 on Ubuntu (#2270)
Using the OpenJDK 11 from java.net on Ubuntu 18 reports "11" as the version, which failed the Java version check on loading audio on a new instance. This change will return "11 0" as the version, passing the check, instead of just "11".
2018-11-24 10:45:37 +11:00
aikaterna
bbccb671b8 [Audio] Disallow seek during active vote (#2290)
Users were able to use seek to skip songs while voteskip was active. This change prevents users from doing so.
2018-11-24 10:43:23 +11:00
Twentysix
8abb24bc01 [Core] [p]leave: Fix incorrect response handling (#2302) 2018-11-24 10:42:05 +11:00
aikaterna
419008f644 [Downloader] Findcog fix with no repo installed (#2304)
The findcog command errored out if a repo was removed. This change informs the user that the repo is not installed instead of erroring out.
2018-11-24 10:39:54 +11:00
odinair
d17c2430d7 [Streams] Fix alerts with no configured mentions (#2305) 2018-11-24 10:14:43 +11:00
Michael H
ca533f8937 [JsonIO] race condition fix (#2308)
* race condition fix

* style fix
2018-11-24 10:11:59 +11:00
Michael H
30c3a4c7c1 [Docs] CentOS correct git version (#2309)
Resolves #2260.
2018-11-24 10:06:59 +11:00
Michael H
9d22d5b7b5 [Cleanup] Correct handling of command message (#2310)
Resolves #2307
2018-11-24 10:04:08 +11:00
Kowlin
2846dce6ea [Mod] [p]modset: Fix KeyError (#2279)
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2018-11-14 23:35:56 +01:00
aikaterna
9973b2e3b8 [General] [p]urban: Handle no embeds (#2285) 2018-11-14 23:21:11 +01:00
aikaterna
d008a2559a [General] Clearer error message for [p]rps (#2284) 2018-11-14 22:56:08 +01:00
FixedThink
6470bc1cda [Mod] [p]userinfo: Get avatar format with proper method (#2291) 2018-11-14 22:46:01 +01:00
Michael H
221b636f3f Prevent locking out owner from commands (#2257) 2018-11-06 11:32:40 +11:00
aikaterna
7f3a0b8a88 [Streams] Add help for streamset (#2287) 2018-11-06 10:26:55 +11:00
FixedThink
f7e41063bf [Trivia] Change Swaziland to its new name, eSwatini (#2275) 2018-11-06 09:52:25 +11:00
aikaterna
d0fca373ba [Audio] Local track verify on playlist start (#2271) 2018-11-06 09:44:26 +11:00
FixedThink
451c4c9d54 [Trivia] Fix text formatting issue (#2269)
The "Question number {}" message was being emboldened twice from the left side, making the bot send messages with two redundant asterisks.
2018-11-06 08:58:10 +11:00
zephyrkul
a59002275d [Economy] Fix TypeError in [p]payouts (#2263) 2018-11-06 08:55:29 +11:00
bobloy
d6cd959a2b [Docs] Update example cog to include base cog class (#2256) 2018-11-06 08:41:34 +11:00
Toby Harradine
99bbde7be9 Reject bad perm kwargs in check decorators (#2289)
Also fixed a misspelled kwarg in reports.

Also now raising TypeError for an empty `@checks.has_permissions()` decorator.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-11-05 15:07:56 +11:00
Kowlin
92dbd14006 Fixes typos in permissions (#2288)
causing the checks to be thrown out of the window.
2018-11-05 04:19:54 +01:00
aikaterna
57f078925e [V3] Update CODEOWNERS for audio (#2277) 2018-10-30 18:19:16 +01:00
palmtree5
6e9243f6e9 Drop unneeded .format in [p]triviaset override (#2268) 2018-10-23 17:40:51 -08:00
Toby Harradine
8b4e12da81 Merge branch 'V3/release/3.0.0' into V3/develop
# Conflicts:
#	redbot/cogs/customcom/customcom.py
#	redbot/core/errors.py
2018-10-16 09:42:38 +11:00
Toby Harradine
8bba860f85 Bump version to 3.0.0rc2
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-16 09:37:23 +11:00
Toby Harradine
d2d26835c3 [Economy] Detect max balance and prevent OverflowError (#2211)
Resolves #2091.

This doesn't fix every OverflowError with MongoDB; but at least the seemingly easiest one to achieve with core cogs.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-16 09:30:53 +11:00
Toby Harradine
aff62a8006 [Downloader] Unload extensions on uninstall (#2243)
Resolves #2216.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-16 09:19:32 +11:00
Toby Harradine
b5fd28ef7c [CustomCom] Better display for [p]cc list (#2215)
Uses a menu, optionally embedded with respect to the embed settings, for scrolling through the custom command list, each cc with a ~50 character preview. Format is purposefully similar to the help menu.

Resolves #2104.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-16 08:39:44 +11:00
Michael H
c510ebe5e5 [Downloader] Only prompt reload of loaded cogs (#2233) 2018-10-15 23:29:56 +11:00
Toby Harradine
5ba95090d9 [Streams] Suppress HTTPExceptions on load (#2228)
Resolves #2227.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-15 22:31:14 +11:00
Toby Harradine
ad51fa830b [Cleanup] [p]cleanup bot includes aliases and CCs (#2213)
Resolves #1920.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-15 22:29:07 +11:00
Christopher Rice
1ba922eba2 [Downloader] Add missing prefix format kwarg (#2238)
Fixes #2237.
2018-10-14 17:11:16 +11:00
Christopher Rice
9588a5740c [Downloader] Define Translator in converters module (#2239)
Fixes #2236
2018-10-14 17:09:54 +11:00
Toby Harradine
7cd765d548 Fix permissions hook removal (#2234)
Some in-progress work slipped through #2149, and I figure it should be fixed before RC2.

I've also just decided to allow discovery of permissions hooks from superclasses as well. We should try to be more aware of the possibility of cog superclasses moving forward.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-14 11:52:39 +11:00
zephyrkul
6022c0f7d7 [Mod] Mute/unmute bugfixes (#2230)
- Helper methods mute_user and unmute_user now take GuildChannel instead of solely TextChannel.
- The bot will not attempt to mute a member with the Administrator permission, as that permission bypasses channel overwrites anyway. The bot will still unmute members with the Administrator permission (see #2076).
- Audit reasons are now specified for mass mutes / unmutes.
- A few typos and missing keyword specifiers were corrected.
- Streamlined some logic and used some already-existing functions.
2018-10-12 15:47:39 +11:00
Toby Harradine
5ed8be9998 Merge V3/release/3.0.0 into V3/develop 2018-10-12 08:59:14 +11:00
Michael H
4357fe1ba9 [Core] Fixes reload, and prompted reload on cog update (#2226)
Fix something missed when QAing #2207
2018-10-12 07:23:04 +11:00
palmtree5
0548744e94 [V3 Cleanup] fix error in cleanup user (#2225) 2018-10-11 14:36:45 +02:00
Toby Harradine
8b2d115335 [Audio] Rename current_build to current_version in Config (#2219)
Renames the `current_build` key to `current_version`. This means the `current_version` key will always be a dict and never a list, and `current_build` having no defaults means it won't mess with `[p]audioset settings`.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-11 12:02:02 +11:00
El Laggron
a64db76b4d [Core] Specify an error message on package loading (#2207)
Allows cog creators to explain clearly why a cog cannot load by raising  `redbot.core.errors.CogLoadError`. Instead of having to check in the console what's wrong, the message will directly be sent in the context channel.
2018-10-11 11:57:11 +11:00
Toby Harradine
094735566d [Warnings] Fix actions not being taken (#2218)
When multiple warning actions were registered, and the user didn't exceed the points for the highest action on the list, no action was taken.

Resolves #2106.

Also commented out the casetype registration for warnings, since it's not actually using modlog yet.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-11 11:54:11 +11:00
Toby Harradine
f7b1f9f0dc [MongoDB] Escape special characters in keys (#2212)
Essentially resolves #2038, although this is escaping and not rejecting keys as that issue implies.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-11 11:20:42 +11:00
Toby Harradine
ce25011f0d [Config] Cast keys to str on get/set/clear (#2217)
This is a step towards a more consistent front-end behaviour of Config, where errors are either circumvented or raised in the same way regardless of the driver being used.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-11 11:18:57 +11:00
Twentysix
c464f5e7dc [CustomCommands] Add [p]cc show (#2204) 2018-10-10 10:27:25 +11:00
bobloy
f85034eb27 [Trivia] Add On/Off as alternatives for YAML bools (#2177) 2018-10-09 22:05:37 +11:00
Toby Harradine
849755ecd2 [Core] Fix errors with [p]backup on MongoDB (#2210)
Resolves #2094.

This command needs some more fixing and cleaning up than this, this is just a simple bugfix which gets it mostly working for now.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-09 15:30:27 +11:00
Toby Harradine
9217275908 [Permissions] Fix ValueError for "default" rule in config/ACL (#2200)
This was thrown when the "default" key existed and Permissions tried to iterate over the list mapping keys as ints.

Also fixed some issues with saving config with keys as `int` instead of `str`.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-09 15:14:59 +11:00
Toby Harradine
00bc3c86b1 Merge V3/release/3.0.0 into V3/develop (#2209) 2018-10-09 09:10:05 +11:00
zephyrkul
9e13ca45e6 [Mod] Fix KeyError in modset (#2208) 2018-10-09 09:04:51 +11:00
aikaterna
46c38a28eb [Alias] Fix alias help (#2194)
Alias help would only return the first character of the invoked command previously. This change shows help for basic commands that are aliased (i.e. just `ping`) or aliased commands that have an argument included (i.e. `audioset role beep` with `beep` being a role name)
2018-10-08 18:23:32 +11:00
El Laggron
76bbcf2f8c [Core] Support already loaded packages in [p]load (#2116) 2018-10-08 08:18:28 +11:00
ASSASSIN0831
ee7e8aa782 [Economy] Revert change to payday message (#2203)
in the updates were for the i18n translation strings the payday command message was accidentally changed to +(amount) (new balance). This changes it back to its original message +(amount) (currency name)
2018-10-08 07:39:30 +11:00
Toby Harradine
ba605495ac [Dev] Use isawaitable over iscoroutine for [p]debug (#2202)
Allows for non-coroutine awaitables (such as config's `_ValueCtxManager`) to be awaited from debug.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-07 19:36:35 +11:00
Toby Harradine
fd0abc250d [Audio] Fix type mismatch between config defaults and set value (#2201)
current_build is now set as a dict, but its default was a list.

This resolves the error an `[p]audioset settings`.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-07 19:33:04 +11:00
Toby Harradine
847f9fc8d1 [CustomCommands] Find default converters properly (#2199)
The new `redbot.core.commands.converter` module was causing default converters to never be found.

Also cleaned up some of the other code (made some methods static, fixed some typing violations)

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-07 12:58:08 +11:00
Toby Harradine
748847d5bf Merge changes for RC1 into V3/develop 2018-10-07 12:06:28 +11:00
zephyrkul
046e98565e [Cleanup] use message_filter() over check() param (#2180)
Cleanup's helper method to collect messages to delete was incorrectly filtering by check rather than message_filter, causing delete_after to be ignored.
2018-10-07 10:19:56 +11:00
Toby Harradine
71eddc89ea [Mod] Fix unresolved reference to Member.permissions in reinvite logic
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-07 09:42:25 +11:00
aikaterna
9730a424ec [Admin] Selfrole list formatting (#2193)
Selfrole list needed a return in between the header and the list.
2018-10-07 08:46:32 +11:00
aikaterna
7b260cdafc [Audio] Playlist list, local queue, DJ Role fix (#2191)
Fix for `playlist list`: added forgotten variable plus return for formatting (fixes #2190)

i18n addditions: DJ Role toggle, Thumbnail display toggle

`audioset settings`: added missed end of line return

`queue` fix: added indentation to not have the currently playing song info repeated in the queue display when playing local songs

`local play` and `local folder` now display the appropriate menu when DJ role is on.
2018-10-07 08:42:13 +11:00
aikaterna
4369095a51 [Economy] Fix for bank set (#2192)
i18n variable was wrong.
2018-10-07 08:26:33 +11:00
Toby Harradine
1c706e8c45 Bump version to 3.0.0rc1.post1
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-06 19:25:14 +10:00
Toby Harradine
91029b73e5 Use our own redbot.core.VersionInfo over distutils.StrictVersion (#2188)
* Implements our required subset of PEP 440 in redbot.core.VersionInfo
* Added unit tests for version string parsing and comparisons

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-06 19:11:05 +10:00
zephyrkul
de4b42a11e [mongo] fix missing URI variable assignment (#2186) 2018-10-06 14:48:03 +10:00
Toby Harradine
03230b6386 Remove branch condition from Travis deployment
So we can automatically deploy from release branches
2018-10-06 14:07:27 +10:00
Toby Harradine
4dbf2796c0 Bump version to 3.0.0rc1
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-06 10:26:59 +10:00
Twentysix
03892f5ef1 [Utils] Markdown helpers escape special chars (#2182)
Escaping italics (`*`) that get passed to `italics()` doesn't work, the string still won't show up properly.
2018-10-06 10:14:11 +10:00
bobloy
fdf3f86ab0 [Utils] Allow menu() to be used DM (#2183)
`ctx.me` handles using `ctx.guild.me` if `ctx.guild is not None`
`ctx.guild.me` directly errors in DMs.
2018-10-06 10:02:09 +10:00
Toby Harradine
7b15ad5989 Merge branch V3/feature/i18n_pass into V3/develop (#2024)
[i18n] Improves the coverage and quality of extracted user-facing string literals in the `redbot.core` package and makes them less ambiguous for the translator.
2018-10-06 09:58:45 +10:00
Toby Harradine
443f2ca556 [i18n] Pass over modlog, permissions, reports, streams, trivia, warnings
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-06 09:01:04 +10:00
Toby Harradine
fa692ccc0b [i18n] Pass over economy, filter, general, image, mod
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-06 09:00:31 +10:00
Toby Harradine
0c3d8af8f4 [i18n] Pass over bank, cleanup, customcom, dataconverter, downloader
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-06 08:57:49 +10:00
Toby Harradine
3a20c11331 [i18n] User-facing string pass over admin, alias and audio 2018-10-06 08:43:19 +10:00
Michael H
aa8c9c350e [i18n] Start work on named format arguments (#1795) 2018-10-06 08:42:38 +10:00
Michael H
139329233a [Utils/Trivia] Handle smart quotes (#2162)
Adds a new filter function for substituting out smart-quotes.

Makes trivia use it.
2018-10-06 08:39:52 +10:00
Michael H
d79996aeea [Downloader] Better user facing feedback on cog update (#2165) 2018-10-06 08:24:55 +10:00
Toby Harradine
fb839084fe Merge branch V3/feature/predicates into V3/develop (#1986)
Predicate utility to replace common boilerplate predicates for event waiting.
2018-10-06 08:15:25 +10:00
Toby Harradine
dea9dde637 [Utils] Finish and Refactor Predicate Utility (#2169)
* Uses classmethods to create predicates
* Classmethods allow using a combination of different parameters to describe context
* Some predicates assign a captured `result` to the predicate object on success
* Added `ReactionPredicate` equivalent to `MessagePredicate`
* Added `utils.menus.start_adding_reactions`, a non-blocking method for adding reactions asynchronously
* Added documentation
* Uses these new utils throughout the core bot
Happened to also find some bugs in places, and places where we were waiting for events without catching `asyncio.TimeoutError`

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-06 08:07:09 +10:00
zephyrkul
ebc657dcc6 [Config] Add Group.clear_raw method (#2178)
Adds a `clear_raw` method to Group objects, similar to the existing `get_raw` and `set_raw` methods.
Documentation included.
2018-10-05 13:03:27 +10:00
zephyrkul
80506856fb [Checks] Preserve backwards compatibility in deprecated functions (#2176)
* [checks] preserve backwards compatability

* [checks] use correct ctx.author
2018-10-04 10:26:44 +10:00
palmtree5
93a0e45c34 [Filter] implement exempting channels from the filter (#2064) 2018-10-03 08:43:04 +10:00
bobloy
3cb2b95121 [V3 Cleanup] Cleanup Before command (#2171)
Adds the ability to cleanup before a specified message id. Requires passing a number of messages to delete to keep with syntax of cleanup self/user
2018-10-03 08:28:10 +10:00
bobloy
a04869ab27 [Trivia] Fix misuse of list.append (#2172) 2018-10-03 08:22:42 +10:00
Twentysix
c69b1185d3 [Black] Don't normalize underscores in numeric literals (#2174) 2018-10-03 08:19:30 +10:00
Toby Harradine
ad7466a026 Dependency Update (#2175)
##### Core requirements
* _discord.py_ Rapptz/discord.py@77239e4 -> Rapptz/discord.py@836ae73
* _aiohttp-json-rpc_ 0.11.1 -> 0.11.2
* _aiohttp_ 3.3.2 -> 3.4.4

##### [test]
* _pytest_ 3.8.1 -> 3.8.2

##### [docs]
* _packaging_ 17.1 -> 18.0
* _pyparsing_ 2.2.1 -> 2.2.2
* _six_ Removed duplicate entry

##### [style]
* _black_ 18.6b4 -> 18.9b0
* _click_ 6.7 -> 7.0

### Notes
- `extra_requires` in setup.py is now a module-level global
- Some style changes have occurred after the _black_ update

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-03 08:10:13 +10:00
zephyrkul
54dad2a604 [Mod] Use list.copy() for tempban expirations (#2166)
Fixes an error left behind from #2161 (modifying a list while iterating over it)
2018-10-02 18:46:11 +10:00
bobloy
d5899fae83 [RPC] Add missing await in rpc_load (#2167) 2018-10-02 18:44:38 +10:00
Redjumpman
5d44bfabed [Utils] Initial Work on Predicate Utility (#1985)
* Add files via upload

* Update predicates.py

Changed sender from a discord.Member object to ctx.
Added a channel check.
Combined the same method and channel method into a validator and applied through-out.
valid_role and has_role methods now check for either an id or a name.
contained now uses string.lower() when testing for membership in a collection.

Signed-off-by: Redjumpman <redjumpman@users.noreply.github.com>
2018-10-02 16:19:40 +10:00
Ryan
b6c8be5f43 [MongoDB] Support mongodb+srv protocol (#2159) 2018-10-01 16:49:29 +10:00
aikaterna
b2abfc5710 [Audio] Playlist list and notify msg changes (#2155) 2018-10-01 16:44:46 +10:00
zephyrkul
a9b328ff3c [Mod] Remove tempban from data after unbanning (#2161)
Resolves #2160.

Also resolves another issue where the bot will error out when getting the guild's invites when it doesn't have the Manage Server permission.
2018-10-01 14:15:51 +10:00
Toby Harradine
0870403299 Permissions redesign (#2149)
API changes:
- Cogs must now inherit from `commands.Cog` (see #2151 for discussion and more details)
- All functions which are not decorators in the `redbot.core.checks` module are now deprecated in favour of their counterparts in `redbot.core.utils.mod`. This is to make this module more consistent and end the confusing naming convention.
- `redbot.core.checks.check_overrides` function is now gone, overrideable checks can now be created with the `@commands.permissions_check` decorator
- Command, Group, Cog and Context have some new attributes and methods, but they are for internal use so shouldn't concern cog creators (unless they're making a permissions cog!).
- `__permissions_check_before` and `__permissions_check_after` have been replaced:  A cog method named `__permissions_hook` will be evaluated as permissions hooks in the same way `__permissions_check_before` previously was. Permissions hooks can also be added/removed/verified through the new `*_permissions_hook()` methods on the bot object, and they will be verified even when permissions is unloaded.
- New utility method `redbot.core.utils.chat_formatting.humanize_list`
- New dependency [`schema`](https://github.com/keleshev/schema)

User-facing changes:
- When a `@bot_has_permissions` check fails, the bot will respond saying what permissions were actually missing.
- All YAML-related `[p]permissions` subcommands now reside under the `[p]permissions acl` sub-group (tbh I still think the whole cog has too many top-level commands)
- The YAML schema for these commands has been changed
- A rule cannot be set as allow and deny at the same time (previously this would just default to allow)

Documentation:
- New documentation for `redbot.core.commands.requires` and `redbot.core.checks` modules
- Renewed documentation for the permissions cog
- `sphinx.ext.doctest` is now enabled

Note: standard discord.py checks will still behave exactly the same way, in fact they are checked before `Requires` is looked at, so they are not overrideable. 

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-01 13:19:25 +10:00
Toby Harradine
f07b78bd0d Fix help command with cogs (#2156)
This bug was introduced in #2122 (whoops)

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-09-30 14:19:25 +10:00
Toby Harradine
b2497386bb Update dependencies (#2148)
Core dependencies:
- discord.py: Rapptz/discord.py@00a659c6 -> Rapptz/discord.py@00a659c6
- multidict: 4.4.0 -> 4.4.2

[docs]
- pyparsing: 2.2.0 -> 2.2.1
- sphinx: 1.7.8 -> 1.7.9

[test]
- pytest: 3.7.4 -> 3.8.1

[style]
- toml: 0.9.4 -> 0.9.6

----

I've also replaced usages of `discord.utils.get(guild.roles, id=id)` with the new O(1) `guild.get_role(id)` method.

Signed-off-by: Toby <tobyharradine@gmail.com>
2018-09-25 16:09:36 +10:00
Michael H
f8558b98c1 Automated mod action immunity settings (#2129)
Refactors, and fixes some logic in filter which was encountered while
applying the settings to core
2018-09-25 11:30:28 +10:00
Michael H
84ac5f3952 JsonIO atomic write improvements (#2132)
Use `async with Lock` instead of deprecated `with await lock` usage.

Forces a file fsync prior and a directory fsync (where available) after rename to prevent issues with left behind temp files.

Also should clarify: this is not threadsafe. Comments were clarified, function names remain misleading.
2018-09-24 18:29:14 +10:00
Michael H
404800c556 Hackban fixes (#2128)
If the member is in the guild, delegates to existing ban logic.

Additionally, check that we have ban perms prior to attempting to fetch the existing ban list.

Fixes #2127.
2018-09-24 18:21:21 +10:00
Toby Harradine
415385b747 [Downloader] Fix git pull command (#2146)
I somehow managed to botch this in #2121

Signed-off-by: Toby Harradine <t.harradine@student.unsw.edu.au>
2018-09-24 13:20:30 +10:00
Toby Harradine
f7dbaca340 Refactor fuzzy help and clean up help command (#2122)
What's changed:
- Fixed issues mentioned on #2031
- Fuzzy help displays more like help manual
- Fuzzy help is easier and more flexible to use
- Fuzzy help string-matching ratio lowered to 80
- Help formatter is more extendable
- Help command has been optimized, cleaned up and better incorporates fuzzy help
- Added async_filter and async_enumerate utility functions because I was using them for this PR, then no longer needed them, but decided they might be useful anyway.
- Added `Context.me` property which is a shortcut to `Context.guild.me` or `Context.bot.user`, depending on the channel type.
2018-09-24 10:34:39 +10:00
bobloy
32b4c6ce86 [Image] Remove V2 relics from command decorators (#2138) 2018-09-23 23:44:01 +10:00
zephyrkul
a3c36d4bde NoneType check for module in should_log_sentry (#2139)
Allows for a lack of module (which returns False) for `should_log_sentry`. This allows for, say, commands to be added by the Dev cog. ( ͡ಠ ʖ̯ ͡ಠ)
2018-09-23 23:42:25 +10:00
bobloy
fc4703ef80 [Launcher] Don't ask for CLI flags when no instances (#2142)
Seems to have been fixed in #1497 but accidentally reverted at a later date.
2018-09-23 23:39:32 +10:00
zephyrkul
a301b2c758 Add missing @staticmethod to Red.send_filtered (#2143)
Method was previously missing `self` argument but was missing static decorator.
2018-09-23 23:34:57 +10:00
Toby Harradine
e27682abd3 [Downloader] More robust repo loading (#2121)
Previously, when downloader was loaded, the RepoManager would spawn a task to load available repos. If one repo failed loading for some reason, the function would raise and the remaining repos would never be loaded, however downloader would still appear to load correctly.

This change handles exceptions better during repo loading, but also, if an unhandled exception is raised, downloader will fail to load as it should.

Also included, as requested in #1968, is the --recurse-submodules flag in cloning/pulling repositories.

This change resolves #1950.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-09-22 15:05:42 +10:00
Toby Harradine
df922a0e3e [Audio] More robust startup and unload (#2118)
* More robust cleanup for audio and streams

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Remove copied code from streams

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-09-22 15:04:46 +10:00
aikaterna
51c83d958c [Audio] Check if player is playing when pausing (#2130) 2018-09-18 23:54:32 +10:00
Toby Harradine
17139ce439 Fix compiler detection on Windows (#2136)
Signed-off-by: Toby Harradine <t.harradine@student.unsw.edu.au>
2018-09-18 14:07:50 +10:00
zephyrkul
61652a0306 [V3 CustomCommands] Cooldowns (#2124)
* customcom cooldowns

allows you to set multiple different cooldowns for custom commands

* black formatting

* [docs] cooldowns
2018-09-17 17:47:45 +02:00
Michael H
113b97b9c9 Fix role check in local blacklist/whitelist (#2134)
fixes #2133 , 

`discord.Role.is_default` is a method, not a property.
2018-09-17 17:30:56 +10:00
zephyrkul
2784730f7f [V3] Utilize shorten_by (#2131)
* utilize shorten_by

otherwise you get errors

* trivia shorten_by

* warnings shorten_by

max username length is 32 characters

* black formatting
2018-09-15 01:48:31 +02:00
Toby Harradine
1a9216b522 Set 3.6.6 as minimum python version on Windows (#2117)
* Set 3.6.6 as minimum python version on Windows

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Conditional python_requires in setup.py

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Should probably add the comment too

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-09-14 21:22:43 +10:00
Toby Harradine
08fc732b7b [Downloader] Fix URL parsing for non-GitHub/GitLab links (#2123)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-09-12 11:01:54 +10:00
Toby Harradine
54baf687ec [Downloader] Parse tree URLs when cloning repos (#2119)
* [Downloader] Parse tree URLs when cloning repos

Signed-off-by: Toby <tobyharradine@gmail.com>

* Only match GitHub and GitLab URLs

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-09-12 10:03:15 +10:00
Toby Harradine
8096cd803e Bump version to 3.0.0b21 (#2115)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-09-10 00:44:11 +10:00
Toby Harradine
27b0d606c8 Fix CCs with no args (#2114)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-09-10 00:35:53 +10:00
aikaterna
af220e497f [Docs] Update sample cog (#2072)
* [V3 Docs] Update sample cog

* Remove self.bot assignment

We don't really do this any more unless we need to
2018-09-09 23:35:22 +10:00
Toby Harradine
892b2487f5 Dependency update (#2100)
aiohttp-json-rpc 0.11 -> 0.11.1
atomicwrites 1.1.5 -> 1.2.1
attrs 18.1.0 -> 18.2.0
certifi 2018.4.16 -> 2018.8.24
discord.py 8ccb98d395537b1c9acc187e1647dfdd07bb831b -> 00a659c6526b2445162b52eaf970adbd22c6d35d
fuzzywuzzy 0.16.0 -> 0.17.0
imagesize 1.0.0 -> 1.1.0
multidict 4.3.1 -> 4.4.0
py 1.5.4 -> 1.6.0
pytest 3.7.0 -> 3.7.4
sphinx 1.7.6 -> 1.7.8

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-09-09 23:21:48 +10:00
Kowlin
7971c02dc5 Escape user and passwords for mongo (#2111)
* Escape user and passwords for mongo.

* Quote -> Quote_Plus

* formatting
2018-09-09 23:07:40 +10:00
zephyrkul
c1d8272b49 [CustomCommands] Show parameter name correctly in help (#2102) 2018-09-09 23:05:33 +10:00
aikaterna
bce5dd26f3 [Audio] Local playback (#2097)
* [V3 Audio] Local playback

* Formatting

* Update application.yml

* Add catch for an empty localtracks directory

* Linebreak in help for i18n
2018-09-09 23:02:53 +10:00
zephyrkul
04e97f3516 [CustomCom] Custom Command Parameters (#2051)
* [V3 CustomCom] Custom Command Parameters

Allows specifying more parameters for CC's via {0}, {1}, etc. that will be filled by the user invoking the CC. Python-style type hinting and attribute access is also allowed for Discord and builtin types.

> [p]cc add simple greet Hi, {0.mention:Member}!
> ...
> [p]greet zephyrkul
> Hi, @zephyrkul!

The bot will reply with the standard help messages if the cc is incorrectly executed.

> [p]greet me
> Member "me" not found

* black formatting

* check command failure

Only call the custom command if the faked command succeeded.

* misc fixes

1) don't str.strip all the time, it's not family-friendly and doesn't match transform_parameter
2) transform_arg now actually returns strings in every case
3) improve prepare_args parsing security
4) help parameters will show what type they expect
5) make linter less angery

* customcom documentation

I hate rst

* don't require repeated type hinting

If a parameter was type hinted previously, don't require it again.
Ex: `{0.display_name:Member}#{0.discriminator}` is now possible.

* add cog_customcom.rts to index

I despise rst

* don't enforce order

Allow type hinting and attribute access to be in either order.
Ex. `{0:Member.mention}` is now valid.

* clean up on_message

We're building context anyway, may as well use it.

* [doc] correct cog name

Cog class is named CustomCommands, not CustomCom

* minor on_message optimization

only build context if it's needed

* update cc_add docstring

Old one wasn't user-friendly. Replaced with a link to the new docs.
Link will not function until PR is merged and docs refreshed.

* [doc] change repeat to say

repeat is an audio command, use say in the example instead

* compare ctx.prefix to None

allows for null prefixes, which is a bad idea but who am I to judge

* address review

* raise error on conflicting colon notation

bugfix I was working on but failed to actually commit
2018-09-07 00:14:02 +10:00
Toby Harradine
7eed033c9e Prettify README and translate to MarkDown (#2101)
Signed-off-by: Redjumpman <redjumpman@users.noreply.github.com>
2018-09-06 21:53:18 +10:00
Richard Guan
a2fe1a8757 [Audio] Don't allow duplicate links in playlists (#2071)
* Just a test

* another test

* undoing my test

* First solution, style issue

* Works functionally, but there are is a minor style issue

* style fixed

* Revert README changes
2018-09-06 16:25:27 +10:00
Toby Harradine
9ee860c3f0 [Core] Command disable feature (#2099)
* [Core] Command disable feature

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* [Core] Allow user to set the "command disabled" message

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Reformat

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-09-06 12:52:19 +10:00
Toby Harradine
1dbe9537e9 Ignore fuzzywuzzy slow sequence matcher warning (#2096)
* Ignore fuzzywuzzy slow sequence matcher warning

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Add log.info call instead

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-09-06 12:50:30 +10:00
Toby Harradine
775f4ce69a Use ProactorEventLoop on Windows (#2062)
* Use ProactorEventLoop on Windows

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Set the actual loop instead of the policy

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-09-06 00:40:15 +10:00
zephyrkul
e83beeef34 [Audio] Add [p]sing (#2067)
* port [p]sing

* [p]sing in alphabetical order

what even is an alphabet
2018-09-04 13:23:50 +10:00
Brramble
e77cfff892 [p]serverinfo respects set embed colour (#2083) 2018-09-04 13:01:50 +10:00
Michael H
9495432b8f More mention filtering (#2081)
* more filters

* note to future people touching this

* chan mentions were almost missed...

* Swap strategies as the previous escaped the mention, while still pinging the user/role
2018-09-04 12:59:59 +10:00
palmtree5
d71c334a34 [Filter] Fix issue with filtering sentences (#2065) 2018-09-04 12:55:18 +10:00
Michael H
aa8cc90ad0 Update minimum Python version to 3.6.2 (#2093)
* Correct minimum version

see #2092 

While this is needed because of an import just for typing, I see no reason not to bump the minimum version since this is a minor version difference since this is several minor version behind the latest 3.6, and there have been both security and performance improvements since.

That said, we need to be testing on our lowest supported version to ensure we don't have this happen again, right now our tests run on whatever Travis grabs for 3.6, which I assume is 3.6.6, but could be wrong.

* Update other mentions of min version to 3.6.2
2018-09-04 11:38:56 +10:00
palmtree5
589041556e [Streams] Fix excessive writes to config (#2095)
Resolves #2052.
2018-09-04 11:01:48 +10:00
El Laggron
85354f2722 Support missing .po files (#2068)
* [V3 Core] Support missing .po files

* Modified if-state

* Use PEP8 recommendation for empty list check

https://www.python.org/dev/peps/pep-0008/#programming-recommendations
2018-09-03 15:44:58 +10:00
Toby Harradine
c0c5535005 [Warnings] Help users understand custom reasons (#2049)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-09-03 14:57:14 +10:00
zephyrkul
e126cf9f4e [Launcher] use "python -m" to run Red (#2080)
friendlier for virtual environments
2018-09-03 10:44:50 +10:00
aikaterna
c2d23b37a7 [Audio] Fix for using [p]now with thumbnail (#2063) 2018-08-28 13:02:40 +10:00
aikaterna
3a968d707f Fix Travis deployment attempt 2 (#2061) 2018-08-27 10:24:03 +10:00
aikaterna
b07c44c8b4 Fix travis deployment (#2060) 2018-08-27 10:09:02 +10:00
aikaterna
43b0a58649 [Audio] Fix for embed color (no, COLOUR) on notify messages (#2059) 2018-08-27 09:44:19 +10:00
Toby Harradine
f258e93cf7 Bump version to 3.0.0b20 (#2050)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-08-27 09:28:37 +10:00
Toby Harradine
93138b04cb [Streams] Set YouTube channel name when added by ID (#2047)
* [Streams] Set YouTube channel name when added by ID

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Move unset token raise to correct place

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Correct logic in get_stream

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Fetch name explicitly instead

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-08-26 23:53:47 +10:00
Toby Harradine
0cf54ec9c2 [Audio] Do less strict matching for java version (#2035)
* [Audio] Do less strict matching for java version

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* [Audio] Fix java version bounds to account for Oracle's bullshit

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-08-26 23:49:27 +10:00
Toby Harradine
ce031cf7bd [Docs] Add virtualenv guide and compress install guides (#2029)
* [Docs] Add virtualenv guide and compress install guides

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* [Docs] Better cross-referencing

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Fix pyenv-installer link

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Use sudo -e instead of sudo nano

* Add note about launcher for linux/mac

* Include launcher notes in Windows guide

* Add missing colon
2018-08-26 23:44:56 +10:00
Toby Harradine
e6495bc7c0 [Trivia] Move Trivia lists back home (#2028)
* [Trivia] Move trivia lists back home

Removes red-trivia as a dependency.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Include package data in distribution

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Add test from red-trivia repo, and fix package data setup

* The distribution will now include all files under any data/ sub-directory of a package, as well as all *.po files under any locales/ sub-directory (as it should have been before).

* MANIFEST.in has been simplified to comply with these changes and redbot/cogs/audio/application.yml has been moved to the data/ sub-directory to maintain consistency in how we declare package data.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-08-26 23:39:46 +10:00
Toby Harradine
1b196bf0fb [i18n] Use redgettext over pygettext (#2023)
* [i18n] Use redgettext over pygettext

* Clear out autogenerated `messages.pot` files

* Remove redundant `regen_messages.py` files

* Refactor `generate_strings.py` to use redgettext

* Install redgettext in Travis Crowdin job

* Clean up some problematic usages of gettext function

* Reformat

* Replace generate_strings.py with Makefile argument

* Update to redgettext 2.1, use exclusion pattern

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-08-26 23:35:42 +10:00
Toby Harradine
dbed24aaca [Config] Group.__call__() has same behaviour as Group.all() (#2018)
* Make calling groups useful

This makes config.Group.__call__ effectively an alias for Group.all(),
with the added bonus of becoming a context manager.

get_raw has been updated as well to reflect the new behaviour of
__call__.

* Fix unintended side-effects of new behaviour

* Add tests

* Add test for get_raw mixing in defaults

* Another cleanup for relying on old behaviour internally

* Fix bank relying on old behaviour

* Reformat
2018-08-26 23:30:36 +10:00
Toby Harradine
48a7a21aca [Commands] Refactor command and group decorators (#1818)
* [V3 Commands] Refactor command and group decorators

* Add some tests

* Fix docs reference

* Tweak Group's MRO
2018-08-26 23:25:25 +10:00
Toby Harradine
f595afab18 [Streams] [p]streamalert twitch channel is not for Discord channels (#2048)
Resolves #2003.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-08-26 23:18:22 +10:00
Brramble
0aca00b245 [Audio] Embed colours respect user settings (#2046)
* Embed colours now respect what the user set

* Formatting

* Get embed colour when ctx is unavailable
2018-08-26 13:09:03 +10:00
Toby Harradine
9af58d3abf [Permissions] Remove hook from is_owner check (#2053)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-08-25 21:56:40 +10:00
aikaterna
dd5ef3696f [Audio] Add thumbnail display with toggle (#1998)
* [V3 Audio] Add thumbnail display with toggle

* [V3 Audio] Add thumbnail to notify messages

* Formatting

* Update thumbnail fetching

* Update thumbnail fetching

* Track thumbnail moved to Red-Lavalink

* Formatting
2018-08-25 10:47:20 +10:00
Toby Harradine
03d49bac53 Update Red-Lavalink to version 0.1.2 (#2034)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-08-24 16:28:01 +02:00
Toby Harradine
6c082a10b1 Fix sync check causing errors (#2045)
* Fix sync check causing errors

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Import timedelta...

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-08-24 16:23:52 +02:00
Michael H
77944e195a Output sanitisation (#1942)
* Add output sanitization defaults to context.send
Add some common regex filters in redbot.core.utils.common_filters
Add a wrapper for ease of use in bot.send_filtered
Sanitize ModLog Case's user field (other's considered trusted as moderator input)
Sanitize Usernames/Nicks in userinfo command.
Santize Usernames in closing of tunnels.

* Add documentation
2018-08-24 23:50:38 +10:00
Michael H
6ebfdef025 Remove self-bot support (#2008) 2018-08-24 22:51:03 +10:00
El Laggron
bc39a6741c [Launcher] append --user if the bot isn't in a venv (#2027)
* [V3 Launcher] --user CLI flag

* Better handling of the sys arguments

* Black reformat to -l 99

* Update launcher to PR#2025

* Always append --user if not in a virtualenv

* Remove --user flag
2018-08-24 22:33:57 +10:00
Michael H
bda7e08208 Handle time innacuracy by warning owner (#2036)
* handle time innacuracy by warning owner

* Fix typo and add space
2018-08-23 11:28:05 +10:00
Michael H
aa69dd381f [Core] Use autohelp properly in local blacklist/whitelist (#2042) 2018-08-23 11:22:03 +10:00
Michael H
1fd8a8e0a6 [Cleanup] Refactor internals (#2013)
* Revert "[Cleanup] Hotfix for [p]cleanup after (#2004)"

This reverts commit 7959654dc8.

* refactor cleanup

* formatting pass

* put back in try/except block
2018-08-21 12:31:48 +10:00
Caleb Johnson
1329fa1b09 [CogManager, Utils] Handle missing cogs correctly, add some helpful algorithms (#1989)
* Handle missing cogs correctly, add some helpful algorithms

For cog loading, only show "cog not found" if the module in question was the one
that failed to import. ImportErrors within cogs will show an error as they should.

- deduplicator, benchmarked to be the fastest
- bounded gather and bounded async as_completed
- tests for all additions

* Requested changes + wrap as_completed instead

So I went source diving and realized as_completed works the way I want it to,
and I don't need to reinvent the wheel for cancelling tasks that remain
if the generator is `break`ed out of. So there's that.
2018-08-21 11:26:04 +10:00
Michael H
b550f38eed [Reports] Add guild-only command check (#2016)
Resolves #2015
2018-08-17 00:00:24 +10:00
Toby Harradine
ae7b912ac8 Major dependency update (#1974)
* [V3] Stop `tmp` dir showing up

* [V3] Remove requirements.txt and declare in install_requires

* Remove requirements.txt from tox.ini

* Update and pin all dependencies and sub-dependencies

* Update for breaking changes

* Reformat

* Update docs/requirements.txt and tox.ini requirements

* Add 3.7 to identifiers and travis/tox builds

* Attempt at fixing the travis build matrix

* Attempt #2

* Attempt 3

* aiohttp.ClientSession.close() -> detach() in sync code

* Add raven-aiohttp to requirements

* Fix stuff in setup.py

 - Added discord.py back into requirements list
 - Fix typo in alabaster extra requirement

Also in the Pipfile:
 - Removed allow_prereleases and explicitly pinned black, since this is the only dep we want a prerelease for.

* Update to Rapptz/discord.py@8ccb98d395

* Add proper 3.7 build in Travis

See travis-ci/travis-ci#9815

* Which version of 3.6 does Xenial install then?

* Maybe we should stop pipenv installing useless stuff

* Nevermind, back to specific minor version

* Remove lots of WET dependency stuff

* Fix egg fragment for dependency link
2018-08-15 12:10:55 +10:00
Michael H
af9478922e Correct errormsg when using discord.ext.commands (#2021)
resolves #2020
2018-08-15 03:05:18 +10:00
Michael H
7acea29cdb [Dev] Friendlier code-block strip for [p]eval(#2017)
not relying on newlines where they aren't required by discord, retaining py highlight support.

Resolves #1928.
2018-08-14 16:31:42 +10:00
Michael H
6082eb21e3 [V3] Enforce use of redbot.core.commands (#1971)
* enforce commands as ours

* clearer user feedback

* No more 'one more tweak' commits without verifying anyway

* more detailed error with docs link + docs update

Resolves #1972.
2018-08-13 11:10:13 +10:00
Toby Harradine
a91cda4995 Version bump 3.0.0b19 (#2005) 2018-08-13 10:32:39 +10:00
Toby Harradine
7959654dc8 [Cleanup] Hotfix for [p]cleanup after (#2004)
* [Cleanup] Hotfix for [p]cleanup after

* Reformat

* Log warning for any 3rd party devs using broken helper
2018-08-12 14:46:30 +10:00
Toby Harradine
dc9a85ca98 [Streams] Add docstring for [p]streamalert list (#2001) 2018-08-12 12:09:38 +10:00
Kowlin
591ed50ac3 [Mod] Omit empty fields from [p]userinfo (#1829)
* Hide roles if none are found.

* Clarify about omitted fields in help doc
2018-08-11 13:59:43 +10:00
Toby Harradine
47350328e6 [CogManager] Correctly separate core, install and other cog paths (#1983)
* [CogManager] Correctly manage core and install paths

This keeps the core and install paths separate from those set in the
config.

It also displays the core path separately in `[p]paths`

Resolves #1982.

* [CogManager] Fix old reference to method removed in previous commit

Also did a bit of a general cleanup of cog_manager.py's code

* Make the core path a class attribute

* [CogManager] Paths should default to a list
2018-08-11 13:31:26 +10:00
Toby Harradine
75ed749cb3 [Admin] Fix [p]addrole error when a hierarchy issue occurs (#1995) 2018-08-11 12:11:15 +10:00
Toby Harradine
f44ea8b749 [ModLog] Call correct method for case message content (#1981) 2018-08-11 12:06:58 +10:00
Toby Harradine
76c0071f57 Pin lavalink to 0.1.0 (#2000) 2018-08-11 12:01:23 +10:00
El Laggron
2a396b4438 [Modlog] Make the case number optional in [p]reason (#1979)
* [V3 Modlog] Make the case number optional

If not specified, it will be the latest case.

* Fix some errors

* Black reformat

* More info for usage string

* Use isdigit instead of isnumeric
2018-08-11 11:44:17 +10:00
Toby Harradine
51a54863c5 [Streams] Don't raise KeyError on missing token (#1994)
Some streaming services don't require a token/clientID.

Resolves #1932
2018-08-10 15:07:30 +10:00
Redjumpman
06f986b92e [General] Fix lmgtfy with '+' in search (#1991) 2018-08-10 14:41:23 +10:00
Toby Harradine
652ceba845 [Bank] Raise TypeError when passing a non-int transaction amount (#1976)
* Raise TypeError when passing a non-int bank amount

* Add a test

* Add some full stops
2018-08-09 22:13:31 +10:00
Michael H
16d0f54d8f [V3 Crowdin] dont upload tox/tests/etc (#1849) 2018-08-09 15:10:30 +10:00
Caleb Johnson
872cce784a [V3 Core] Fix unload_extension for module-less cogs (#1984)
Fixes #1943

This just skips cogs when  `__module__` is None. Also:
- backported rapptz/discord.py#621
- moved RPC handler unregister to remove_cog()
- raise an exception when a load would overwrite an existing extension
2018-08-08 10:26:14 +10:00
Toby Harradine
aec3ad382a [CI] Re-enable and fix linkchecking for docs build (#1990) 2018-08-07 18:24:44 +10:00
lionirdeadman
9d4f9ef73c [General] UI improvements to [p]urban (#1871)
* Changed urban dictionary for my embed version

* Used black for formatting

* Fixed everything according to Tobotimus's review

* Fixed the description limit to 2048 characters

* Better fix adding "..." at the end if neccessary

* Add non-embed version

* Blackify
2018-08-07 16:33:39 +10:00
Caleb Johnson
cf7cafc261 [sentry] use raven-aiohttp (#1967) 2018-08-04 15:44:58 +10:00
Kowlin
e3bff7e87c Version bump v3.0.0b18 (#1959)
Administrative Merge: Solo beta release.
2018-07-25 06:15:36 +02:00
Michael H
4b19421075 [V3] use uvloop if available (#1935)
* use uvloop if available

* Update __main__.py

requested changes made
2018-07-25 05:55:55 +02:00
Michael H
cf371e8093 fix invalidation (#1945) 2018-07-25 04:44:25 +02:00
Kowlin
5eeadc6399 Commented out the link checking (#1958) 2018-07-25 04:33:43 +02:00
Redjumpman
f6823ea3d1 Update bank.py (#1937) 2018-07-25 02:57:25 +02:00
aikaterna
f24290c423 [V3 Help] Exception for help when bot is blocked (#1955)
Fix for #1901.
Administrative merge: Travis CI failed due to docs issue, see #1957
2018-07-25 02:39:51 +02:00
Michael H
f8a36885fe doc string corretion (#1944)
Administrative merge: Travis CI failed due to docs issue, see #1957
2018-07-25 02:33:17 +02:00
Kowlin
a555eff2cc Fixed a bug with the JSON Driver (#1953)
Administrative merge: Travis CI failed due to docs issue, see #1957
2018-07-25 02:18:54 +02:00
Kowlin
05c389623c Removed warnings as errors argument (#1954) 2018-07-23 02:04:30 +02:00
Michael H
bf00f5e9a2 [V3] tox match pinned version d.py (#1930) 2018-07-12 05:51:00 +02:00
aikaterna
7685c4d5d5 [V3] Bump version to 3.0.0b17 (#1929) 2018-07-12 04:21:38 +02:00
aikaterna
e701ec9617 [V3 Audio] More aggressive empty disconnect (#1925) 2018-07-12 04:14:58 +02:00
Michael H
6c1ee096a1 [V3 permissions] command usage consistency (#1905)
* make the default rule settings consistent with the rest

* update docs to match new behavior
2018-07-12 04:09:28 +02:00
aikaterna
2df282222f [V3 Audio] Fix for playlist queue duplicates (#1890)
* [V3 Audio] Fix for playlist queue duplicates

And some sanitizing of playlist names.

* [V3 Audio] Playlist naming standardization

Enforced single-word playlist name across all playlist commands, removed A-Z 0-9 name standardization. [p]playlist delete will still accept playlist names with quotes as there should be a way to remove already-existing playlists with spaces in their name.

* [V3 Audio] Black formatting
2018-07-12 04:01:11 +02:00
El Laggron
43c7bd48c7 [V3 Mod] Fix wrong reason used for modlog (#1842) 2018-07-12 03:54:32 +02:00
aikaterna
86579068d9 [V3 Admin] Clean up help strings (#1906) 2018-07-12 03:49:37 +02:00
Michael H
8e6ab9aa35 [V3 reports] Display user discrim (#1913)
* [V3 reports] Display user discrim

* Update reports.py

minor change for clarity

* format pass
2018-07-12 03:38:07 +02:00
palmtree5
77566a887a [V3 Warnings] changes to the warnings cog (#1867)
* [V3 Warnings] clarify text on entering commands

* Fix up action commands and allow for no command on both add and remove

* Notify warned user when they receive a warning + disallow warning and unwarning self

* Add myself to COOWNERS for the warnings cog
2018-07-12 03:29:22 +02:00
Redjumpman
9d0eca1914 Update economy.py (#1898) 2018-07-12 03:22:29 +02:00
Michael H
79a3164d9d [V3] Mod/admin role logic corrections (#1914)
* [V3] Mod/admin role logic corrections

* Update mod.py

* Update mod.py
2018-07-12 03:17:44 +02:00
aikaterna
eb73e48192 [V3 Audio] Respect voice channel permissions (#1878)
* [V3 Audio] Respect voice channel permissions

* [V3 Audio] Respect the user limit

* [V3 Audio] Exemption for channels with no limit
2018-07-12 03:11:51 +02:00
Eslyium
cd6af7f185 [V3 Streams] Rewording Responses/Docstrings (#1837)
* [V3 Streams] Rewording Responses/Docstrings

w/ Black if I did this right

* Readding strings
2018-07-12 03:07:15 +02:00
Michael H
3d6020b9cf [V3/permissions] Performance improvements (#1885)
* basic caching layer

* bit more work, now with an upper size to the cache

* cache fix

* smarter cache invalidation

* One more cache case

* Put in a bare skeleton of something else still needed

* more logic handling improvements

* more work, still not finished

* mass-resolve is done in theory, but needs testing

* small bugfixin + comments

* add note about before/after hooks

* LRU-dict fix

* when making comments about optimizations, provide historical context

* fmt pass
2018-07-12 02:56:08 +02:00
Michael H
461f03aac0 [V3 Context] Aliasing Colour to color (#1916)
* [V3 Context] Aliasing Colour to color

We should stay consistent here and keep the aliasing from upstream, even when we extend this.

* fmt pass
2018-07-12 02:50:59 +02:00
Michael H
35149f8837 [V3] DM usage fixes (#1919)
* DM usage fixes

* ...

* ...

* ...

* ok, formatting...
2018-07-12 02:46:14 +02:00
Toby Harradine
c0d01f32a6 [V3] Use our own checks instead of discord.py's (#1861)
* [V3] Use our own checks instead of discord.py's

* Remove bot.has_permissions checks too
2018-07-12 02:33:39 +02:00
Toby Harradine
83a0459b6a [V3] Remove all mentions of Python 3.5 (#1896)
We don't speak of him any more.
2018-07-12 02:23:18 +02:00
Toby Harradine
50f6dcef2f [V3] Stop tmp dir showing up (#1895) 2018-07-12 02:17:54 +02:00
Eslyium
5c514fd663 [V3 Reports] Rewording Responses/Docstrings (#1860)
* [v3 Reports] Rewording Responses/Docstrings

* Add the old name for [p]reportset toggle as alias

Also made some lines a bit shorter

* A few more

* Fix typo

* Clarity in [p]report docstring
2018-07-12 02:02:41 +02:00
Michael H
1c2196f78f autohelp changes. (#1836) 2018-07-12 01:23:18 +02:00
Michael H
43cc3c40f3 [V3] use configured color in all places (#1918)
* use configured color

* help formatter too
2018-07-12 00:50:46 +02:00
Michael H
7a6a4cf59d typo fix (#1917) 2018-07-08 22:18:53 +02:00
Michael H
3bcf375204 [V3] Fix duplicate help on ignore (#1862) 2018-06-25 22:00:56 +10:00
Michael H
a175bdc1c7 [V3 Cleanup] Fix cleaning up too many messages (#1864)
Resolves #1863
2018-06-25 21:45:43 +10:00
El Laggron
b557b437a3 [V3] More badges in README (#1879)
* [V3 README] More badges

* Fixed destination
2018-06-25 21:38:32 +10:00
Michael H
d1f0b59b5d [V3] Verify checks for command groups (#1882) 2018-06-25 21:33:36 +10:00
aikaterna
3ece3a1f2b [V3 Audio] Fix for not saving via playlist create (#1889) 2018-06-25 21:20:28 +10:00
aikaterna
1f1a85de18 [V3 Audio] Add checking for valid file on upload (#1891) 2018-06-25 20:32:46 +10:00
aikaterna
e08c9dafa6 [V3 Economy] Payday leaderboard clarification (#1892)
When [p]payday is used with a global bank, the number place shown on the message is relative to the global leaderboard. Since [p]leaderboard shows the server leaderboard by default, this can be confusing on a global bank as payday will most likely report a different place number than the user's server leaderboard does.
2018-06-25 20:17:44 +10:00
El Laggron
ad27607ccc [V3] --token and --no-instance flags (#1872)
* Ability to run Red with token without instance

* --no-instance flag

* Reformatted cli with black

* Fix changes requested by @Tobotimus

- Use "system reboot" to be clearer
- save_default_config renamed to create_temp_config
- More documentation for the create_temp_config function

* Update create_temp_config call

* Fix up imports
2018-06-25 19:25:23 +10:00
El Laggron
c1bcca4432 [V3 Downloader] Allow use of prefix in install message (#1869)
* [V3 Downloader] Allow to use the prefix in install msg

* Update docs

* Let's do the same for repo addition

* Fix indent

* Use replace instead of format

* Update docs
2018-06-25 12:42:47 +10:00
El Laggron
9f2ed694ce [V3 Launcher] Show version in main menu (#1810)
* [V3 Launcher] Show version in main menu

* Fix syntax

* Fix typo

* Make text underlined

* Show if red is outdated
2018-06-23 12:50:34 +10:00
Will
edadd8f2fd [V3 Config] Fix for unnecessary writes on context mgr exit (#1859)
* Fix for #1857

* And copy it so we don't have mutability issues

* Add a test
2018-06-23 12:15:22 +10:00
Will
afa08713e0 [V3] Make pytest fixtures available as a plugin (#1858)
* Move all fixtures to pytest plugin folder

* Add core dunder all

* Update other dunder all's

* Black reformat
2018-06-23 11:33:06 +10:00
Michael H
d23620727e [V3 Mod] Userinfo past nicks/names (#1865)
* [V3 Mod] Userinfo past nicks/names

Prevents trying to do a string replace on a NoneType

* address root cause as well

* remove extra whitespace that got pasted in from web editor
2018-06-20 19:49:01 +02:00
Redjumpman
b456c6ad3b [V3 Config] Fixed set_raw example in docstring (#1876)
fixed doc string
2018-06-20 11:27:36 +10:00
Tobotimus
0298b53803 [V3 JSON] Drivers deepcopy input/output data (#1855)
* [V3 JSON] Return deepcopy in JSON driver

* Add a test

* foo not bar

* Add a test for setting and then mutating

* Resolve issue for setting and mutating as well

* Reformat
2018-06-11 12:31:01 -04:00
Michael H
bfd6e4af3f [V3 Report] Remove outdated reference to tunnel.close() (#1856) 2018-06-11 22:16:41 +10:00
Michael H
31612aae4a [V3 Mod] Fix [p]modset used without a subcommand (#1854) 2018-06-11 22:02:29 +10:00
palmtree5
219367e7c1 Bump version to 3.0.0b16 (#1804) 2018-06-10 15:07:57 -08:00
Will
7b64f10fc7 [V3] Pin discord.py for beta 16 release (#1848)
* Update main requirements

* Update docs requirements

* Black reformat after version update

* Pin dpy  in docs
2018-06-10 19:01:58 -04:00
Twentysix
1ad1744054 [V3 General] Fix online user count in [p]serverinfo (#1844)
* [General] Fix online user count in [p]serverinfo

* [General] Attempt to please the black gods
2018-06-10 23:25:54 +10:00
palmtree5
7b825f2cd7 [V3] Add some tests (#1590)
* Add some tests related to economy

* Add a test for repo removal

* black style formatting
2018-06-09 22:00:21 -04:00
aikaterna
3759fce090 [V3 Audio] Empty channel disconnect setting (#1832)
* [V3 Audio] Empty channel disconnect setting

* [V3 Audio] Small fixes

* [V3 Audio] Remove unused variable

* [V3 Audio] Timer task
2018-06-09 21:55:28 -04:00
Will
470521f7c8 [V3 DataConverter] Fix past nicks conversion for mod (#1840)
* Fix existing tests permanently modifying attributes

* Add dataconverter tests file

* Fix past nicks spec converter

* Update gitignore for dataconverter data files

* Add data file for dataconverter test

* Simplify fix
2018-06-09 20:27:06 -04:00
Tobotimus
a070dffb93 [V3 Streams] Fix streams race condition (#1834) 2018-06-10 00:12:58 +10:00
Will
9e7bc94aab Catch another error on windows compiler failure (#1830) 2018-06-09 03:48:03 +02:00
Tobotimus
033d0113a5 [V3] Send meaningful responses on conversion failure (#1817)
* [V3] Send meaningful responses on conversion failures

* Replace existing `discord.ext.commands` imports

Just to be sure

* Better Permissions converter response
2018-06-08 21:20:40 -04:00
Tobotimus
d0a53ed2df [V3 Core] Fix backup error (#1820) 2018-06-08 21:12:16 -04:00
Michael H
49b80e9fe3 [V3 Report] Patch issue with attachment grabbing (#1822)
* This fixes the issue on report's side

* This prevents delete_delay from causing future issues where message objects are needed

* black format pass

* use the tools we have to clean this logic up a lot
2018-06-08 21:08:00 -04:00
Michael H
d5f5ddbec5 [V3 Help] Fix formatter field pagination (#1813)
* fix prefix

* help formatter pagination fix

* index comp fix
2018-06-08 21:02:28 -04:00
Michael H
17c7dd658d [V3 Core] Command group automatic help (#1790)
* decorator inheritence

* black format

* add autohelp

* modify commands to use autohelp
2018-06-08 20:54:36 -04:00
Will
ca19ecaefc [V3 Downloader] Add a requirements list to cog info (#1827) 2018-06-08 20:48:46 -04:00
Tobotimus
c149f00f82 [V3 Menu] Don't block on adding reactions (#1808)
* [V3 Menu] Don't block on adding reactions

* Add a comment
2018-06-08 20:43:42 -04:00
Will
b041d59fc7 [V3 Downloader] Make hidden hidden and add disabled (#1828)
* Make hidden hidden and add disabled

* Add documentation
2018-06-08 20:39:07 -04:00
Will
b983d5904b [V3 RPC] Swap back to initial RPC library and hook into core commands (#1780)
* Switch RPC libs for websockets support

* Implement RPC handling for core

* Black reformat

* Fix docs for build on travis

* Modify RPC to use a Cog base class

* Refactor rpc server reference as global

* Handle cogbase unload method

* Add an init call to handle mutable base attributes

* Move RPC server reference back to the bot object

* Remove unused import

* Add tests for rpc method add/removal

* Add tests for rpc method add/removal and cog base unloading

* Add one more test

* Black reformat

* Add RPC mixin...fix MRO

* Correct internal rpc method names

* Add rpc test html file for debugging/example purposes

* Add documentation

* Add get_method_info

* Update docs with an example RPC call specifying parameter formatting

* Make rpc methods UPPER

* Black reformat

* Fix doc example

* Modify this to match new method naming convention

* Add more tests
2018-06-08 20:31:38 -04:00
Michael H
8b15053dd4 [V3 Mod/Modlog] prevent self-casing the bot + feedback for heirarchy (#1777)
* prevent the bot from being a modlog target

* prevent heirarchy issues in mod

* modify this comparison to avoid more complex mocking of the guild object in mod test

* spelling
2018-06-08 20:27:07 -04:00
Tobotimus
e15815cd97 [V3 Downloader] Don't do 3rd party agreement without command args (#1821) 2018-06-08 20:18:51 -04:00
palmtree5
94a64d8fae [V3 Downloader] Split available and installed cogs (#1826) 2018-06-08 19:58:20 -04:00
Michael H
fd7088de1a [V3 Help formatter] Better name-as-prefix handling (#1823)
* prefix handling

* actually, integration role isn't a valid way
2018-06-08 11:11:44 -04:00
Will
7d4946560d [V3] Fix typo in load (#1814) 2018-06-08 10:56:03 -04:00
Michael H
b7c9647e1a [V3] Fix dm help set (#1806) 2018-06-07 01:23:26 -04:00
Will
36b9f64aae [V3 Alias] Fix missing await (#1805) 2018-06-07 14:53:12 +10:00
Eslyium
60a72b2ba4 [V3] Cleanup quotes in cogs (#1782)
* Cleanup quotes in cogs

* More quote cleanup that I missed

fixed a little bit of grammar here and there as well.

* [V3 Warnings] Change allowcustomreasons docstring

To help not confuse users who would believe that the command would use allow or disallow.

* Run black reformat
2018-06-07 00:42:59 -04:00
jjay12365
f830f73ae6 [V3 Streams] Fixed issue with making YT Stream Embed (#1812)
fixed error not allowing bot to make yt stream embed
2018-06-06 14:57:25 -04:00
Michael H
95f51e1126 [V3] Add missing await for [p]set prefix (#1809) 2018-06-06 17:08:33 +10:00
Michael H
8916f55d52 [V3] permissions canrun fix (#1787)
* permissions canrun fix

* Missing await

* async gen
2018-06-05 12:33:45 -08:00
Michael H
4aaef9558a [V3 Core] local whitelist/blacklist (#1776)
* implements local whitelist/blacklist which had unused bot.db settings

This includes a role listing

* format pass

* Update core_commands.py

* .

* black format pass
2018-06-05 12:19:44 -08:00
palmtree5
0b78664792 [V3 Fuzzy search] fix several issues with this feature (#1788)
* [V3 Fuzzy search] fix several issues with this feature

* Make it check if parent commands are hidden

* Check if compiler available in setup.py

* Let's just compile a dummy C file to check compiler availability

* Add a missing import + remove unneeded code
2018-06-05 22:14:11 +02:00
Michael H
db5d4d5158 [V3 launcher] token can be an empty string (#1794)
* token can be an empty string

* I like this sytlistically more
2018-06-05 11:59:42 -08:00
Tobotimus
0dfd8b6453 [V3 Docs] Add intersphinx link to discord.ext.commands api reference (#1764) 2018-06-03 17:32:25 -08:00
rngesus-wept
11a2fb1088 [V3 Core] Fix display of whitelist and blacklist members (#1789) 2018-06-03 21:41:36 +10:00
Michael H
40feeff442 [V3 core.commands] decorator inheritence fix (#1786)
* decorator inheritence

* black format
2018-06-02 18:34:30 -08:00
Michael H
a0a2976e0a [V3] Fixes issue preventing token reset from setup (#1771)
* fixes issue preventing token reset.

Also removes a faulty assumption about not needing cleanup tasks

* Update __main__.py

remove unneeded condition
2018-06-02 18:43:26 -04:00
Michael H
741f3cbdcc [V3 CLI] CLI prefix args correctly display in the on_ready print (#1770) 2018-06-02 18:36:13 -04:00
Michael H
a6965c4b5a [V3] Hide help command from help (#1772) 2018-06-02 18:29:16 -04:00
Tobotimus
19b05e632c [V3] Use typing.TYPE_CHECKING instead of utils.TYPE_CHECKING (#1778)
Not needed any more as we no longer support python<3.6
2018-06-02 18:24:16 -04:00
Michael H
8610b47a68 [V3 Admin] Announce ignore parameter modification (#1781) 2018-06-02 18:20:01 -04:00
aikaterna
2ab8890540 [V3 Audio] Check for empty queue in [p]skip (#1769)
Privileged users outside of the channel could invoke skip with an empty queue.
2018-06-02 18:15:10 -04:00
Michael H
5de5a519c3 [V3 Permissions] Don't rely on load order to be consistent (#1760)
* Modifies permissions re #1758

* requested changes in
2018-06-02 18:10:40 -04:00
Tobotimus
0d193d3e9e [V3] Make bot send typing whilst loading cogs (#1756)
* Show bot is responsive during cog load

* Log download of Lavalink.jar event

* Fix #1709's other bug

* Reformat

* Update core_commands.py from merge
2018-06-02 18:06:10 -04:00
Tobotimus
622382f425 [V3] Clean up some ugly auto-formatted strings (#1753)
* [V3] Cleanup some ugly auto-formatted strings

* Reformat
2018-06-02 18:01:14 -04:00
Tobotimus
c1f09326cc [V3] Use sys.exit() over exit() (#1755) 2018-06-02 17:56:28 -04:00
Tobotimus
ddbbba4aaa [V3] Ignore .idea/ directory entirely (#1754)
* [V3] Ignore .idea folder entirely

Since we're not including anything from it currently, so there's no reason not to ignore it.

* Ignore IDEA project files
2018-06-02 11:55:34 +10:00
Tobotimus
bcf7ea30c5 [V3 Core] Add a much-needed forward reference (#1763) 2018-06-02 11:20:06 +10:00
Will
35e9fab701 [V3 Admin] Add notes about case sensitivity for selfrole (#1762) 2018-06-02 11:01:08 +10:00
Will
864b6d313e [V3 Core Commands] Refactor some commands for testing/RPC (#1691)
* Extract load/unload/reload

* Add a few more commands

* Refactor load/unload signature

* Add invite URL and version info

* Black fixes

* Split the incoming cog names in reload correctly

* Reformat

* Remove meta.bot
2018-06-02 10:49:59 +10:00
aikaterna
d47d12e961 [V3 Audio] Restrict check for reactions on [p]now (#1752) 2018-06-02 02:44:30 +02:00
Michael H
9f0e752318 [V3 Core] Fix error on [p]set command when used in DM (#1748)
* issue #1741 fix

* requested changes
2018-06-02 09:26:12 +10:00
palmtree5
34bd5ead15 [V3] Drop 3.5 support (#1721) 2018-06-01 19:20:21 -04:00
Redjumpman
1fd5dffdc7 [V3/Misc] Spelling, Grammar, and doc string fixes. (#1747)
* Update streams.py

* Update filter.py

* Update permissions.py

* Update customcom.py

* Update image.py

* Update trivia.py

* Update warnings.py
2018-06-01 19:20:12 +10:00
Michael H
6d7a900bbb [V3] Use Embed.Empty for unset embed colour (#1750) 2018-05-31 14:31:44 +10:00
Tobotimus
fb4f921159 [V3 Docs] Pin RTD yarl version (#1744) 2018-05-29 18:42:30 -08:00
Tobotimus
14cc701b25 [V3] Update black version and reformat (#1745)
* Update black version and reformat

* Pin black in extras_require
2018-05-29 18:37:00 -08:00
Tobotimus
d8c4113d24 Remove 3.5 from tox environments (#1740) 2018-05-30 02:18:12 +02:00
Michael H
9eb6bb7738 [V3 permissions] more docs + minor addition. (#1737)
* more info

* docstring
2018-05-28 12:02:42 -08:00
Michael H
de96f8b9f9 Fixed Readme (#1730)
* twine

* twine

* twine

* twine
2018-05-28 19:03:50 +02:00
palmtree5
e34975001c [V3] Bump version to 3.0.0b15 (#1720) 2018-05-27 21:48:05 -08:00
Michael H
f3b282062b get channels (#1729) 2018-05-27 21:42:47 -08:00
Michael H
84732a24fa [V3] Drop verbose output on check failure (#1725) 2018-05-27 21:27:44 -08:00
Michael H
dad775b494 [V3 Context] use bot's color if it has one (Ux Consistency with help formatter) (#1706)
* use bot's color if it has one

* add bot color support to context

* alias color to colour too to match d.py consistency

* Update context.py

* Update context.py

* black fix
2018-05-27 21:23:03 -08:00
palmtree5
05ad3fcd5c [V3 Modlog] add events for modlog cases (#1717)
* Give modlog case objects the bot as an attribute

* Dispatch modlog_case_create and modlog_case_edit events

* case.bot, not just bot

* fix a couple more issues resulting from refactor

* Case.edit doesn't need the bot parameter lol

* Make create_case return the case object (because tests)

* Modify create_case docstring

* Fix a docstring
2018-05-27 21:18:50 -08:00
Redjumpman
6ae02d2d02 [V3/Readme] Update V3 Readme (#1703)
* Update and rename README.rst to README.MD

* Update and rename README.MD to README.rst

Changed the file type back to rst from MD

* Update README.rst

Changed image size.

* Update README.rst

Changed the cogs.red link to point at issue 1398 until the portal displays V3 cogs.

* Update README.rst

Changed image host to imgur
2018-05-27 21:14:24 -08:00
Michael H
757a3114dc [V3] rpc close removed (#1726) 2018-05-27 21:06:13 -08:00
palmtree5
94b9878c6c [V3 Downloader] add repo info command + add short descriptions in repo list (#1701) 2018-05-28 07:01:54 +02:00
palmtree5
7775b16199 [V3] Optimize the backup command (#1666)
* [V3 Core] Enhance [p]backup to exclude some files

* Backup the repo list too

* Lol Sinbad's pre-commit hook

* Add option of sending the backup to the owner via DM

* Drop an unnecessary config object in RepoManager

* Move the backup functionality in redbot-setup to the new stuff

* More work on implementation, including backing up the instance data
2018-05-28 06:56:28 +02:00
palmtree5
f01d48f9ae [V3 Docs] allow [p]shutdown to actually shut the bot down (#1668) 2018-05-28 06:51:31 +02:00
palmtree5
179883094e [V3 Context] make send_help respect embed setting (#1723) 2018-05-28 06:37:58 +02:00
palmtree5
971ccf9df4 [V3 Core] add support for setting a color for embeds (#1707)
* [V3 Core] add support for setting a color for embeds

* Add a guild toggle for whether to use the bot color

* Add a function for getting embed color in Context

* Coroutines need to be awaited lol
2018-05-28 06:28:22 +02:00
Michael H
07eb6bf88e Reverted Ping back to its original state (#1712) 2018-05-28 06:17:02 +02:00
palmtree5
5afd8174ca [V3 Launcher] update cli flag getter (#1696)
* [V3 Launcher] make some updates to the cli flag selector

* Add the --mentionable flag
2018-05-28 06:06:59 +02:00
aikaterna
f1fea38712 [V3 Mod] Unmute server does not need channel (#1695) 2018-05-28 05:36:44 +02:00
El Laggron
f275c6e5e7 [V3 Launcher] Fixed issue with update choice (#1649)
*  [V3 Launcher] Fixed issue with update choice

extras_selectors() was run even if what the user did input for the development choice (stable/dev) was wrong

* [V3 Launcher] Option to go back when updating

* [V3 Launcher] Fixed coding style
2018-05-28 05:30:35 +02:00
palmtree5
5ec25959df [V3 Help] add tagline support (#1705)
* [V3 Help] add tagline support

* Make the tagline resettable

* Actually, let's allow the user full control over the footer
2018-05-28 05:25:18 +02:00
palmtree5
4f270f3aab [V3] Start work on fuzzy command search (#1600)
* [V3] Start work on fuzzy command search

* Implement in command error handler

* Something isn't working here, try fixing

* Style compliance

* Add fuzzywuzzy to pipfile

* Dump the short doc part if there is no short doc

* Add fuzzy command search on command not found in help

* Move things around, implement for use of default d.py help formatter

* Formatting compliance

* Undo pipfile changes
2018-05-28 04:57:10 +02:00
bobloy
4028dd3009 [V3 Downloader] Pagify cog list and typing fix (#1662)
* Cog list is now pagified

* Proper typing of Tuple

* Black formatting

* More Black formatting
2018-05-28 03:55:33 +02:00
Tobotimus
706b04610d [V3] Implement --dry-run flag (#1648) 2018-05-28 03:46:06 +02:00
Michael H
014e3baea0 pagification (#1722) 2018-05-28 03:35:57 +02:00
Michael H
92ca7c935a Docstring fix (#1724) 2018-05-28 03:30:58 +02:00
palmtree5
5c9b1c9a3d Move [p]userinfo to Mod + refactor [p]names (#1719) 2018-05-28 03:23:24 +02:00
Tobotimus
5ebee60c97 Rejoice for a 3.5-less Travis (#1713) 2018-05-28 03:18:23 +02:00
Tobotimus
3337a9cbab [V3 Launcher] Fix error when removing Mongo instance (#1710)
* [V3 Launcher] Fix error when removing Mongo instance

Fixes #1573

* Fix issue causing style check to fail

* Remove unneeded whitespace
2018-05-27 16:08:25 -08:00
Michael H
54975eb812 [V3] Permissions (#1548)
* This starts setting up checks.py to handle managed permission overrides

* A decent starting point, more work to come

* missing else fix

* more work on this

* reduce redundant code

* More work on this...

* more progress

* add a debug flag to some things in .resolvers to help with exploring why checks behave in a certain way

* modify this to be a list for ease of showing full resolution order

* more

* don't bypass is_owner, ever

* remove old logic about ownercommands

* better handling of chec validity

* anonymous functions return None for __module__, remove some code as a result

* mutable default bind fix

* Add a caching layer (to be invalidated as needed)

Ensure checks in the chain inserted before the core logic only return None or False
(whitelists then blacklists are checked first in core logic, from most to least specific scope, overriding this with an allow does not make sense)

* more progress, slow work as I have time

* Modifies the predicates so that their inner functions are accesible from cogs without
being a check

* Update checks.py

Safety for existing permissions.py cogs

* This is where I take a change of course on setting this up,
because this would have been the most long winded interactive command ever as
it was starting to progress.

This is going to support individual entry updates, settings from yaml, gettings, and clearing existing settings
as well as printing a settings template out and referring people to what is going to be very well written docs

* block permissions cog from being unblocked by the permissions cog as a safety feature (really, co-owner exists at this point)

* WIP

* Okay, this has the intent of the changes, just to actually test these as working as intended + add corresponding guild functions

* oh nice, missed a couple files, sec...

* WIP, also, something's broken in resolvers or check_overrides >>

* This is working now (still needs docs and more...)

* unmerge changes from other PR

* is_owner still needs to exist in here due to management of non checked commands

* Update this to new style standards

* forgot to commit some local changes earlier

* fix update logic

* fix update logic

* b14 fix, lol

* fix issue with management command name

* this isnt a real fix

* Ok..

* perms

* This is working, but needs docs and more configuration opts now

* more

* Ux functions, need testing

* style

* fix using the obj str rather than the id

* fix CogOrCommand converter

* Return the correct things in the converter

* last fix, needs docs, and possibly some extra Ux utils

* start doc writing

* extra user facing commands

* yaml docs

* yaml fix

* secondary checks-fix

* 3rd party check stuff

* remove warning that this isn't ready yet

* swap ctx.tick for real responses, require emoji perms for interactive menuing, better attr handling for nicknames

* send file to author

* alias to `p`

* more ctx tick removal

(This is a long ass changelog...)
2018-05-28 00:17:17 +02:00
rngesus-wept
537531803a [V3 Admin] Correct spelling of 'hierarchy' (#1714) 2018-05-27 12:25:26 -08:00
Tobotimus
f4b640126b [V3 Warnings] Fix warn command when no valid reason is passed (#1672)
Resolves #1670
2018-05-27 12:15:56 -08:00
El Laggron
1de3251127 [V3 Docs] Reference 3.6 docs (#1715) 2018-05-27 12:05:35 -08:00
palmtree5
7e98076e4a [V3 Docs] expand info.json docs (#1699) 2018-05-25 12:38:32 +02:00
palmtree5
c58c55b752 [V3 Docs] Move the install docs to install Python 3.6 (#1685)
* [V3 Docs] drop ffmpeg from CentOS install guide

* [V3 Install Docs] move all to Python 3.6

* Update the toctree

* Needed a blank line

* drop a .6 that wasn't needed
2018-05-24 11:09:08 -08:00
Michael H
928be5717f [V3 Checks] Respect administrator and guildowner permissions (#1711)
* respect admin and guildowner (implicitly) in checks for permissions

* this needed it too
2018-05-25 01:17:21 +10:00
Redjumpman
ccbaa926ce [V3 Economy] fix erroneous message when transferring with insufficient funds (#1698)
Fixed an erroneous message when transferring credits while having insufficient funds.
2018-05-23 11:45:23 -08:00
Tobotimus
d1208d7d19 [V3] Update CONTRIBUTING.md with details on new dev workflow (#1659)
* Update CONTRIBUTING.md with details on new dev workflow

* Fix typos

* Update link in README.rst

* tiny grammar fix

* Specify the line length

* Update CONTRIBUTING.md

* Fix links in contents

* Add section for keeping dependencies up-to-date

* Include notes about Makefile
2018-05-23 15:26:54 +10:00
Tobotimus
099fe59a97 [V3 Core] Add [p]helpset (#1694)
* Add settings and commands for page and character limits

* Add missing returns

* Consistent responses
2018-05-22 21:04:53 -08:00
Will
889acaec82 [V3 Downloader] Fix #1671 (#1692) 2018-05-22 20:54:00 -04:00
palmtree5
c42e9d4c5c Add a makefile for helping with style checking and reformatting (#1665)
* Add a makefile

* Add make.bat

* Slightly modify Palm's makefile

* Use make in tox

* Minimise diff and refactor PATHEXT

* Fix a typo in make.bat
2018-05-22 20:44:11 -04:00
Will
4378e5295d [V3 Downloader] Fix #1594 (#1693) 2018-05-22 20:37:34 -04:00
Will
73a427f6aa [V3 RPC] Initial RPC library switch (#1634)
* Initial RPC library switch

* Use weak refs to the methods so cog unload works

* Add docs

* Black fixes

* Add jsonrpcserver to Pipfile.lock
2018-05-22 16:29:26 -08:00
aikaterna
abfee70eb3 [V3 Audio] Only allow audio commands in servers (#1682)
* [V3 Audio] Only allow audio commands in servers

Fixes #1681

* [V3 Audio] Formatting fix
2018-05-22 19:39:01 -04:00
Michael H
77cdbf8dd6 [V3 Alias] Add checks to alias add/del (#1676) 2018-05-22 19:27:11 -04:00
aikaterna
28bc68c916 [V3 Audio] [p]llsetup fixes (#1656)
* [V3 Audio] [p]llsetup fixes

[p]llset wsport changed to not use the rest port setting and both the rest and ws ports were changed to use ints instead of strings.

* [V3 Audio] Version change
2018-05-22 19:19:47 -04:00
Will
ecb64cc2ec [V3] Add deprecation warning for Python 3.5 (#1684)
* Add deprecation warning for python 3.5

* Use colorama

* Modify background color

* Just print to stdout
2018-05-20 20:56:50 -08:00
bobloy
23706a1ba9 [V3 Tests] Fix downloader test failing on Windows (#1673)
* ignore idea

* windows option

* Remove personal setting

* proper undo

* Requested changes

```
("repos", "squid") == pathlib.Path('TEST\\\\TEST2\\\\repos\\\\squid').parts[-2:]
True
("repos", "squid") == pathlib.Path('test/test2/test3/test4/repos/squid').parts[-2:]
True
```

* Needs to remove newline too

Resolves #1663
2018-05-19 12:11:41 +10:00
Michael H
d3f406a34a [V3 Travis] Update travis to not skip pipfile lock... (#1678)
* Update travis to not sip pipfile lock

update pipfile dependencies

additional black formatting pass to conform to black 18.5b

* .

* pin async timeout until further discussion of 3.5 support

* .
2018-05-18 17:48:22 -08:00
bobloy
55afc7eb33 [V3 Downloader] Handle errors when importing modules (#1655)
* Handle errors when importing modules

* Do nothing with error

* Updated to black formatter standards

* More Black formatting
2018-05-17 13:42:41 -04:00
Tobotimus
7a70d12efd [V3] Add tox (#1641)
* Configure tox environments for install, dev install and docs build

* Configure Travis to run tox

* Use 3.5.1 since it's our minimum supported version

* Bump lower travis build version to 3.5.2

Turns out a dependency is incompatible with 3.5.1.

* Modify Travis config to install from pipenv

* Try without skipping the lock

* Try without pip cache

* D the dev install with pipenv

* See if adding the pip cache back in breaks

* Remove the development installation

It doesn't really make any sense considering we already should be installed in develop mode, as does Travis.

* Oops, tox should go under dev packages

* Do black --check with tox

* Uncache pip again...

* Try a build matrix, and try ignoring virtualenvs

* Activate pipenv shell on travis

* Try installing prereleases

* Try the build matrix like this

* Try exclusion

* Upgrade pip

* Try this environment marker

* Back to stages...

* Try run over shell

* Try skipping the lock again

* This'll be faster but probably ignore 3.5

Because Travis

* Just manually list sources for black to check

* Magic?

* What if I told you...

That this worked perfectly on Tobotimus/Red-DiscordBot@test_travis_matrix

* It couldn't possibly be this easy

* Let's add some comments to be nice

* Let's change back to trusty just in case the stages fuck up

* Add another comment because why not

* Let's try caching pip one more time

* We don't need to whitelist these
2018-05-15 13:10:14 +10:00
palmtree5
1ecaf6f8d5 Black formatting for generate_strings.py and docs/conf.py (#1658)
* Black formatting for generate_strings.py

* Also add docs/conf.py
2018-05-15 09:27:06 +10:00
Will
e01cdbb091 Black tests and setup.py (#1657) 2018-05-15 09:09:54 +10:00
Michael H
b88b5a2601 [V3] Update code standards (black code format pass) (#1650)
* ran black: code formatter against `redbot/` with `-l 99`

* badge
2018-05-14 15:33:24 -04:00
Michael H
e7476edd68 [V3] fix help on missing cog and command docstrings (#1645)
* [V3] fix help on missing cog docstrings

* I think this is what you're looking for

* Also do a NoneType check for commands
2018-05-14 20:13:12 +10:00
Will
cbbeb412f9 [V3 Docs] Fix makefile and add dpy back in to the requirements (#1646) 2018-05-14 15:30:42 +10:00
Will
f544890f00 [V3 Docs] Modify RTD config to (hopefully) make it build (#1644)
* Fix docs requirements

* Modify RTD config
2018-05-14 15:03:43 +10:00
Will
72560fa6d0 [V3] Add pipenv files (#1642)
* Add pipenv files

* Pipfile updates

* Update sphinx version
2018-05-14 14:20:20 +10:00
Tobotimus
4637ff78c0 [V3 Docs] Remove all build warnings (#1640)
* Upgrade sphinx version to 1.7+

* Fix title overlines/underlines in autostart_systemd.rst

* Skip trying to document a method from discord.py

* Add escaped space after backtick

* Escape underscores (sphinx tries to interpret a hyperlink)

* Use fully qualified reference for class

* Fix reference in tunnel.py

* Remove python syntax highlighting in data_converter.py

For some reason sphinx couldn't lex these as python. Removing the highlighting seems like the logical solution for now, since if it wasn't being lexed, it wouldn't highlight anyway.

* Comment out static path since we're not using it right now

* Update sphinx version in docs requirements too

Would rather remove this duplication but RTD is a special snowflake
2018-05-13 20:06:52 -08:00
palmtree5
501aff41ea [V3] Bump version to 3.0.0b14 (#1629) 2018-05-13 16:24:40 -08:00
Michael H
449b1bfe9e Make checks.py manageable from a permissions cog (#1547)
* This starts setting up checks.py to handle managed permission overrides

* missing else fix

* don't bypass is_owner, ever

* Modifies the predicates so that their inner functions are accesible from cogs without
being a check

* Update checks.py

Safety for existing permissions.py cogs

* block permissions cog from being unblocked by the permissions cog as a safety feature (really, co-owner exists at this point)

* un mix the 2 PRs (*sigh*)

* Update checks.py

remove debug prints that got lost inshuffle
2018-05-14 10:13:16 +10:00
aikaterna
4a8358ecb4 [V3 Audio] Update queue and search to use menus (#1633)
* [V3 Audio] Update queue and search to use menus

* [V3 Audio] Fix for playlist upload saving

* [V3 Audio] Add position in queue to enqueued songs

Also a bit of cleanup.

* [V3 Audio] Improvements for mobile formatting
2018-05-14 10:01:46 +10:00
Tobotimus
8f74e4dd31 [V3 Cleanup] Cleanup commands clean up after themselves (#1602)
Resolves #1572
2018-05-13 15:51:50 -08:00
Michael H
2b35d9f012 [V3 cleanup] Respect pinned messages by default (#1596)
* This sets the default behavior for `get_messages_for_deletetion()` to not include pinned messages, while providing a way to override that

resolves #1589

* actually make commands parse for pinned deletion

* fix capitalization
2018-05-13 15:49:45 -08:00
palmtree5
35001107e0 [V3 Streams] cache stream alert messages across restarts (#1630)
* [V3 Streams] cache stream alert messages across restarts

* Add some stuff to debug this

* More debug stuff

* More debug stuff

* Actually save when updating a stream alert

* Remove debug stuff

Fixes #1620
2018-05-14 09:42:28 +10:00
Leo Garcia
a7d7b90ae8 [V3] Removed py 3.6 warning for Windows (#1622)
I believe we've fixed this awhile ago.
2018-05-14 09:32:41 +10:00
Tobotimus
119ba7ef8b [V3 ModLog] Fix [p]reason when the modlog case has no moderator (#1604) 2018-05-14 09:24:17 +10:00
palmtree5
28bbe9c646 [V3 i18n] add a NoneType check on trying to normalize a string (#1632)
Fixes #1631
2018-05-14 09:10:38 +10:00
Michael H
8739c04024 [V3] Ping changes (#1618)
* moves ping to core commands
defaults ping behavior to reacting with a ping pong paddle with ball
adds an optional boolean flag to ping to get the avg latency from the bot
(strikes a middle ground with intended behavior from dev standpoint, and how users want it)

* casing for @Kowlin

* use correct check for permissions

* remove latency
2018-05-13 15:03:17 -08:00
Tobotimus
57240d25b9 [V3] Update trivia version and allow installing in develop mode (#1635)
* [V3 Trivia] Update trivia version to >1.1

* Use actually working trivia version
2018-05-13 13:43:16 -08:00
Tobotimus
15ea5440a3 [V3 i18n] Internationalise help for commands and cogs (#1143)
* Framework for internationalised command help

* Translator for class docstring of cog

* Remove references to old context module

* Use CogManagerUI as PoC

* Replace all references to RedContext

* Rename CogI18n object to avoid confusion

* Update docs

* Update i18n docs.

* Store translators in list instead of dict

* Change commands module to package, updated refs in cogs

* Updated docs and more references in cogs

* Resolve syntax error

* Update from merge
2018-05-12 01:47:49 +02:00
Michael H
1e60d1c265 [V3] adds a permissions check for embed_links in ctx.embed_requested (#1619) 2018-05-10 14:35:18 -08:00
Tobotimus
b7cd097c43 [V3 Trivia] Lock trivia version to <1.1 (#1621) 2018-05-10 13:20:40 -08:00
bobloy
6c934b02e6 [V3] Fix help's help (#1606) 2018-05-10 13:14:44 -08:00
Kowlin
fcb9b40b43 [V3] Fixed [p]servers bug (#1617)
* Fixed servers bug

* Added protections against going negative
2018-05-10 13:10:42 -08:00
Michael H
7a6884e4b1 [V3] Mark 3.7 as unsupported in setup.py (#1623) 2018-05-10 13:04:20 -08:00
Michael H
e86698cfeb [V3] Update some user facing info (remove old, outdated info) (#1613)
* remove outdated link in favor of in docstring docsumentation

* Update default Downloader repo url to org repo url (don't rely on github redirect)
2018-05-08 22:27:38 +02:00
Bakersbakebread
53650aefa6 [Docs] Added self (#1608) 2018-05-08 19:47:11 +02:00
Tobotimus
1d80a0cad1 [V3 Mod] Fix issue with unmuting, again (#1603)
* [V3 Mod] Fix issue with unmuting, again

Resolves #1595

* Fix typo
2018-05-07 13:31:14 +02:00
retke
f6d27a0f43 [V3 Parser] Added --load-cogs flag (#1601)
* [V3 Parser] Added --load-cogs flag

* Removed old PR data

* Removed old PR data

* Removed old PR data

* Slightly reword help for flag

* Stick to convention for checking if sequence is empty

* Fix some logic errors

* Don't print packages which failed to load
2018-05-07 15:01:44 +10:00
Wyn
f71aa9dd21 [V3 Docs] Autostart (#1599)
Moved note to the top, added how to access red log.
2018-05-05 15:43:26 -08:00
palmtree5
1cb5394e96 [V3] bump version to 3.0.0b13 (#1583) 2018-05-04 08:48:33 +02:00
palmtree5
2b2dbd25f7 [V3 Help] fix issue with non-existent subcommands (#1565) 2018-05-03 22:19:24 -08:00
Michael H
dd4cd0eeb1 provide an extra method for helping wor with embed_requested (#1558) 2018-05-04 08:16:24 +02:00
palmtree5
ee7b0cf730 [V3 Utils] fix files not being chmodded (#1578) 2018-05-04 08:10:56 +02:00
retke
95ef5d6348 [V3 Launcher] Reinstall Red option (#1536)
* [V3 Launcher] Reinstall Red option

* [V3 Setup] Divided remove_instance function

* Removing changes from another PR

* Indent fails fix

* use remove_instance_interaction for --delete

* Fix some issues with remove_instance

removed `index: int` because what's being passed there is a string
data -> instance_data

* bug fixes, working version
2018-05-04 08:01:37 +02:00
bobloy
23192b9ef6 simple_embed doesn't take author (#1555)
Simple embed doesn't use ctx.author as author
2018-05-04 07:27:44 +02:00
Michael H
7cd98c8a63 Report fixes + improvements (#1541)
* WIP

* fix perms issue

* better

* more work

* working

* working, tessted

* docs

* mutable default fix
2018-05-04 06:38:58 +02:00
palmtree5
fca7686701 [V3 Core] fix 3.5-specific issue with [p]backup (#1586) (#1588) 2018-05-04 06:18:44 +02:00
Michael H
be767478f4 allow deletion based on user ID (actually this time) (#1561) 2018-05-04 06:15:27 +02:00
palmtree5
b3ad5d90ed [V3 Core] fix a couple issues with [p]servers (#1580) 2018-05-04 06:05:09 +02:00
palmtree5
fb093b7411 [V3 Utils] Menu system (#1566)
* [V3 Utils] start on a menu system

* Fix conflicting names

* [V3 Menus] change order of default controls

* [V3 Menus] add a message check to the react check

* Add a note about original source and who ported

* Compare message ids, not the objects themselves
2018-05-04 05:54:30 +02:00
palmtree5
e4ea3110e3 [V3 Warnings] fix several bugs found (#1577) 2018-05-04 05:46:59 +02:00
aikaterna
79676c4f72 Playlist additions and cleanup (#1579)
Add playlist append, create, remove, and upload.
2018-05-04 05:43:00 +02:00
Wyn
d61827b92c [V3 Docs] Fixed broken link (#1567)
Guide migration went into a maze, this should fix it.
2018-05-04 05:33:01 +02:00
palmtree5
1f1f46c70f [V3] move to multiple issue/pr templates (#1585) 2018-05-04 03:58:30 +02:00
Wyn
9188e4a7ec [V3 Info] Don't rely on redirect (#1581)
* [V3 Info] Don't rely on redirect

Http -> Https

* Update core_commands.py

Use existing variable instead of new string

* Update events.py

Remove redirect, url only reference
2018-05-02 10:35:48 +02:00
Redjumpman
e5a780eb0c Update mod.py (#1582)
Update doc-strings to properly format in the help text.
2018-05-01 09:13:25 +02:00
palmtree5
d8c85a2b15 [V3 Audio] fix zombie process on unload (#1575) 2018-04-29 08:19:49 +02:00
palmtree5
83080bc5a2 [V3 Mod] fix issue with unmuting (#1568) 2018-04-28 13:39:06 +10:00
Wyn
233bfc59ac [V3 Docs Arch] Upgrade dependencies (#1553)
-u parameter added to pacman for upgrading dependencies so we don't get partial upgrades.
2018-04-19 13:29:44 -08:00
Bakersbakebread
c606caf3a3 Grammar Change With -> Will (#1539)
Any message successfully forward WILL be marked...
2018-04-18 12:28:12 +02:00
palmtree5
efdf69552f [V3] Beta 12 release (#1525)
* [V3] update translations from Crowdin

* [V3] bump version to 3.0.0b12
2018-04-16 19:05:21 -08:00
Michael H
38531bf95c [V3 Tunnel utils] Better handling of tunnel instances (#1538)
* Better handling of tunnel instances

* docs
2018-04-16 19:02:38 -08:00
Wyn
6d714db928 [V3 Audio] Add Lavalink Jar build to settings (#1430)
* [V3 Audio] Add Lavalink Jar build to settings

Added Lavalink Jar build to Lavalink settings since build number now stored in config.

* Forgot import

Added import

* Left align

K im done for real this time
2018-04-16 18:57:17 -08:00
Michael H
f8e7497695 [V3] Remove old usage of type tuples with config (#1518) 2018-04-16 21:41:13 -04:00
TheFixed
d6ef812704 [V3 Admin] fix typo (#1537)
it's -> it is or it has
its -> possessive form of it
2018-04-16 17:36:38 -08:00
Will
4f81bc9621 [V3 CogManager] Fix duplicate paths/reorderpath not working (#1501)
* Fix duplicate paths/reorderpath not working

* Make remove path use the visible paths not the internals.
2018-04-16 21:21:31 -04:00
aikaterna
59276ce2a5 [V3 Audio] External lavalink server settings, playlist saving & recall, bugfixes (#1528)
* Add settings for external lavalink servers

* Add external lavalink server to settings display

* Add simple error handling

* Remove future permissions conflict

Assuming base Red permissions will be accessed with the 'p' command in the future

* Update prev to set requester to user instead of id

* Various fixes

Jukebox: Plebs not in a channel will not have the song cost deducted before the warning to join a channel first.
DJ role: Finer grained permissions for plebs that are alone: they can use prev (if shuffle is off), skip, pause, resume

* Update permissions

* Add track number to footer when queueing

* Add basic playlist saving

More subcommands to come later

* Check if user is not in voice

* Restrict playlist deletion to author and mods

* Add playlist info command
2018-04-17 00:42:32 +02:00
Michael H
96791bd72b [V3] supress pynacl warning (#1508)
* supress pynacl warning

* move the supression to __init__.py

* ..

* Revert "move the supression to __init__.py"

This reverts commit ee7ba9c968.

Doesn't properly work here

* Changes are fine in __init__.py

Needs a module level import in __main__.py or the console scripts generated by pip setup don't ever run the code in __init__

* supress pynacl warning

* puts the changes back again to avoid duplicate module import warning
2018-04-16 14:32:05 -08:00
Michael H
8756b22f5a [V3] Report Tool (#1281)
* Okay, let's fix the issues here hopefully.

* This is working now

* Unfinished, and needs a lot of testing.

* more work

* working

* minor thing to remove

* improve i18n and usage feedback
2018-04-16 13:56:14 -08:00
Wyn
487d256f46 [V3 Docs] Added Arch Installation guide (#1504)
* Added Arch Installation guide

For prereqs:
python-pip pulls python which pulls required packages libffi and openssl
Removed ffmpeg for Java replacement

* index

Adding the guide to the index sounds like a smart idea...

* Removed libsodium

Not needed after all

* added --user flag to installs for pip
2018-04-16 23:45:53 +02:00
Pier-Angelo Gaetani
fe0b6aaba4 [V3 Docs] Systemd guide + extras (#1505)
* Documentation extras

Added links to each distro's user add functions
Added systemd service guide
Added --user operator to pip install commands

* Update autostart_systemd.rst

Added no-prompt flag
2018-04-16 23:44:08 +02:00
retke
017c8a6900 [V3 Mod] Denying add_reactions permission to muted users (#1495)
* denied permission of adding reactions to muted users

* Track both send_messages and add_reactions perms
2018-04-16 12:17:03 -08:00
Michael H
afe4af0dc2 [V3 Launcher] fix issue with instance removal via launcher (#1535)
* handle issue

* or it would have if I had put it on the right line

* no more making patches from my phone
2018-04-16 11:57:57 -08:00
bobloy
fb8e4430ac [V3] Fix Cleanup loop (#1533)
* prevent infinite loop

* pep8 updates

Assorted pep8 updates to retrigger Travis

* Revert "pep8 updates"

This reverts commit d0c7f8b808.
2018-04-16 11:51:01 -08:00
Bakersbakebread
7499f5dbfa [V3 Mod utils] Beihnd -> behind typo (#1531)
Fixed typo
2018-04-16 11:41:11 -08:00
bobloy
c7b58aa65b [V3 Economy] guild -> server in [p]bank reset (#1530) 2018-04-16 11:37:29 -08:00
bobloy
705d9b8238 [V3] guild->server (#1529)
Mostly string renames
customcom now recognized {guild} and {server}
2018-04-16 11:32:51 -08:00
bobloy
1bc650b0f9 [V3] Mod.py guild -> server (#1522)
* mod guild->server naming

* typo
2018-04-16 10:13:26 +02:00
palmtree5
580aeea4e2 [V3 Instance setup] fix an issue getting credentials to convert Mongo to JSON (#1514)
* [V3 Instance setup] fix an issue getting credentials to convert Mongo to JSON

* Attempt a fix at data conversion issues
2018-04-16 10:03:21 +02:00
palmtree5
8495824843 [V3 Core] unhide [p]embedset (#1523) 2018-04-16 09:59:34 +02:00
aikaterna
18bb3611fa [V3 Economy] Add credits name to payday (#1496) 2018-04-15 15:23:09 -08:00
bobloy
9f7bf8d1a2 [V3 Launcher] don't get cli flags if no instances are found (#1497)
Don't get cli flags unless there is an instance to get
2018-04-15 15:20:59 -08:00
Michael H
82146eda3d [V3/docs] New Audio, remove old reqs... (#1503)
* typo fix

* update docs with up to date reqs (remove old) and reccommend venv usage

* remove youtube_dl from reqs

* adding the mac doc update after verifying correctness

* venv installation required for py3.5 ...

* remove venv stuff, that can be handled on a unified page in a later PR
2018-04-15 14:44:16 -08:00
Sebass13
d75881e1a3 [V3 Economy] Add per-role payouts (#1488) 2018-04-15 14:40:32 -08:00
Will
5be967e8c5 [V3 Audio] Harden Lavalink boot sequence (#1498)
* Do a bit of hardening

* Loop not asyncio

* Don't use new asyncio coolness

* I hate you all

* Muck up everything

* Fix version comparisons
2018-04-15 14:01:56 -08:00
Kowlin
d9fa875d84 [V3] Splitted deployment stage into their own stages. (#1524)
* Splitted deplyoment stages into their own stage.

* Updated Codeowners to reflect meta files.
2018-04-13 13:16:36 -08:00
rngesus-wept
04f93c98d2 [V3] Add .pytest_cache to .gitignore (#1520) 2018-04-11 14:45:53 -08:00
palmtree5
402f6c19e7 [V3 Core] fix some issues with [p]set and [p]set nickname (#1494)
* [V3 Core] fix AttributeError in [p]set

* Fix [p]set nickname

* Make the nickname param on [p]set nickname optional
2018-04-04 12:42:10 +02:00
Michael H
84b0df0437 [V3 Data Converter] Python3.5 compatibility issue patch (#1491)
* python3.5 patch

* urf -> utf
2018-04-02 22:17:40 -04:00
palmtree5
9f4a7f7623 [V3] Bump version to 3.0.0b11 (#1483) 2018-04-02 17:19:50 -08:00
retke
10012c1e16 [V3] added --version flag (#1479) 2018-04-02 17:17:19 -08:00
Michael H
d65f8856f4 [V3] Data Converter (#1293)
* More docstrings

* still not ready...

* push this untested pile of code.

* working, menu needs cleaning up though, modlog converter not here yet

* menu cleanup

* add note about the fact that values are overwritten

* add i18n

* User friendlier quitting

* Better naming of a function

* setup automodule for dataconverter

* More documentation

* use Config.MEMBER (etc) instead of 'MEMBER' (etc)
2018-04-02 21:14:37 -04:00
Will
d79d8fbbea [V3] Fix logic issue with [p]load (#1460) 2018-04-02 17:09:17 -08:00
palmtree5
772590c41c [V3] Add settings displays to [p]set and [p]bankset (#1475) 2018-04-02 21:01:43 -04:00
aikaterna
d9c71bddb8 [V3 Audio] Add voteskip and DJ role (#1473)
* [V3 Audio] Add voteskip and DJ role

* Fix connection time storage for audiostats

* Update pause command for more explicit handling

Partially fixes #1478. Users will need to use pause twice before resuming until issue no. 20 on the Red-Lavalink repo is addressed.

* Update pause command

* Update pause command

* Add jukebox mode

Adds a price option for enqueuing songs. If DJ mode is active when jukebox mode is active, no one is charged credits as mods are exempt and plebs can't queue songs without the DJ role.
2018-04-02 20:53:37 -04:00
Will
29ce2401ca [V3 Config] Fix unloading and implement singleton driver (#1458)
* Add the identifier as an initialization parameter

* Remove config object singleton and opt for a shared JSON datastore

* Fix bot unloading to deal with memory leaks

* Fix tests

* Fix clear all bug
2018-04-02 16:47:27 -08:00
Will
720ef38886 [V3 Help] Fix the two missing characters in help (#1456) 2018-04-02 16:29:44 -08:00
Will
728ab6c8c1 [V3 Downloader] Allow for requiring minimum python version (#1455) 2018-04-02 16:26:07 -08:00
Will
935028addc [V3 Downloader] Add install messages from info.json (#1453) 2018-04-02 16:23:55 -08:00
palmtree5
e70e22d557 [V3 Image] Actually check if a client ID is set before making request (#1485)
* [V3 Image] actually check if a client id is set before making request

* Clarify imgurcreds docstring + drop guild_only from [p]imgur

* Fix the actual problem (bad urls)

* needs to be params not data
2018-04-02 20:14:16 -04:00
palmtree5
f3db4b5cb0 [V3 Modlog] Fix TypeError related to 'until' (#1487) 2018-04-02 20:09:09 -04:00
palmtree5
d60fc06379 [V3] Update translations from Crowdin (#1490) 2018-04-02 19:39:07 -04:00
Wyn
a813260717 [V3 Audio] Bump timeout connecting to Lavalink (#1474)
* [V3 Audio] Bump timeout connecting to Lavalink

Lavalink server can take 20-35 seconds to start, bumped to 50 seconds for good measure.

* Update audio.py

Added proper timeout

* Update __init__.py

Removed old timeout
2018-04-02 19:36:26 -04:00
bobloy
10d01df7dd [V3 General] Text fix in flip command (#1489) 2018-04-02 12:43:11 -08:00
palmtree5
8eb075fa86 [V3 Core] Embed toggling support (#1467)
* [V3 CogManagerUI] implement text-only support in [p]cogs

* Change page length to 1800 + workaround for pages starting with delim

* [V3 Core] text mode support for [p]contact and [p]dm

* Implement text-only support in modlog and fix everything that broke because of it

* Fix modlog stuff in filter too

* Fix tests

* Implement optional embed support in [p]help

* move to .format
2018-03-28 20:15:51 -04:00
palmtree5
c2e7bfa641 [V3 Instance setup] Implement backup support for instances using Mongo (#1470)
* [V3 Instance setup] import backup support for instances using Mongo

* remove_instance is now a coroutine + remove NIE

* move Mongo import down

* move another import
2018-03-28 20:12:26 -04:00
palmtree5
2f23244937 [V3 Core] Add [p]backup (#1471)
* [V3 Core] add [p]backup

* move imports
2018-03-28 19:53:27 -04:00
palmtree5
9ecea9e1d5 [V3 instance setup] Warn and request confirmation if instance name already in use (#1469) 2018-03-28 19:13:34 -04:00
palmtree5
61b34e835e [V3] Drop an unnecessary if in embed_requested (#1468) 2018-03-28 19:10:02 -04:00
palmtree5
4e2b83c052 [V3 Docs] Add and update existing features (#1451)
* [V3 Docs] bump version

* Remove removed functions from __all__

* Update docstring format

* Update copyright year

* Add embed utils docs

* Document bot class

* Document RPC

* Update toctree
2018-03-24 17:27:04 -04:00
palmtree5
45ee4755a6 [V3 Core] Fix url sent when doing [p]invite (#1461) 2018-03-24 17:24:06 -04:00
palmtree5
59281afe90 [V3 Instance setup] cog identifiers are strings, not ints (#1448) 2018-03-22 19:11:27 -04:00
retke
cf5a63a5d5 [V3] Set token command fix (#1449)
* [V3] Add set token command

* DM check

* warning message + delete if token isn't send in DM

* Update string formatting

* fix condition invertion
2018-03-22 19:08:57 -04:00
Will
96869074c3 [V3 Docs] Third time's the charm (#1447)
* Get the right sphinx version

* Add mongo extra
2018-03-20 21:14:25 -04:00
Will
c107d5fa7f [V3 Docs] Really fix it this time (#1444) 2018-03-20 21:08:01 -04:00
Will
bed56e8891 [V3 Docs] Add new RTD yaml file (#1443) 2018-03-20 20:58:48 -04:00
palmtree5
c4b641e62a [V3] Bump version to 3.0.0b10 (#1418) 2018-03-20 16:36:32 -08:00
James
153d710eb4 [V3] Allow load, unload and reload to deal with multiple packages (#1441)
* [V3] Allow load, unload and reload to deal with multiple packages

This PR allows multiple packages to be loaded, unloaded or reloaded with the one command, the packages are delimited by the space character as suggested by Will
This is just the functionality, I'm sure the code could be better

* introduced helper function for getting package load strings

* missed characters

* forgotten import 👀

Forgot to include the import `inline` method from chat_formatting
2018-03-20 16:32:54 -08:00
palmtree5
83471e0866 [V3 Core] implement commands and settings for embeds (#1437)
* [V3 Core] add settings for whether to use embeds or not

* Implement commands to toggle embed settings

* Add a function to context for finding whether to use embeds or not

* Hide [p]embedset for now

* Move embed_requested to bot

* Add a simple helper in context
2018-03-21 01:17:40 +01:00
Michael H
01b9843883 [V3] Change presence (continued fixes) (#1438)
* This better fixes the root issue rather than attempting to work around it

* move bot_in_guild to checks, and use the correct syntax
2018-03-21 01:12:40 +01:00
retke
749af89e9f [V3] Set token command (#1425)
* [V3] Add set token command

* DM check

* warning message + delete if token isn't send in DM

* Update string formatting
2018-03-21 01:08:36 +01:00
palmtree5
27b61a2770 [V3 Streams] Fix community alerts (#1426)
* [V3 Streams] fix community alerts

* drop unneeded parentheses + delete messages when removing from cache

* move to one embed for a community

* fix adding image to embed

* Remove unneeded params

* Really helps to point to the right place

* drop the game, move channel name+link to value

* Use stream title in embeds

* Increase number of streams to grab to 100

* filter out streams with existing individual alerts in the channel

* need channel id, not stream id in filtering function

* sample from the list

* we only want to break out if the alert is a TwitchStream alert

* drop off sending the mentions if there are none
2018-03-20 19:25:23 -04:00
palmtree5
eb3b6346bb [V3] Set r/w access before deleting files (#1412)
* [V3] set access before deleting

* [V3] move+rename do_delete and use in repo removal in downloader
2018-03-20 18:46:15 -04:00
aikaterna
2e9a0de4a1 [V3 Audio] Update audio to use Red-Lavalink (#1440)
* [V3 Audio] Update audio for Red-Lavalink

* Update requirements for new library

* Fix logic for connect time storage for audiostats

Only store time when connecting to the voice channel.
2018-03-20 23:28:31 +01:00
palmtree5
f83e3cc3e7 [V3 Economy] Expand payday output (#1386)
* [V3 Economy] implement suggestions from #1371

* Fix a typo

* Add functions for getting leaderboard and leaderboard position

* Use the new functions to get leaderboard position and leaderboard (overrides https://github.com/Cog-Creators/Red-DiscordBot/pull/1435)

* Actually implement showing only guild members on leaderboard when bank is global

* get_leaderboard_position needs to be awaited

* For global bank, pass None for guild to get_leaderboard when trying to find position

* Remove some unneeded code

* Wrong index...

* Combine 3 messages into 1

* Fix guild leaderboard while bank is global

* add missing parentheses

* Modify the leaderboard formatting

* More work on leaderboard formatting

* no subtraction
2018-03-20 18:22:10 -04:00
palmtree5
a8f4659552 [V3 Instance Setup] Storage swapping (#1421)
* [V3 Instance Setup] start work on storage swapping

* This should do the trick for Mongo -> JSON

* Fix typo

* Fix a few more typos

* resolve the data path

* Upsert the imported data

* need a list of the documents

* to_list is a coro
2018-03-16 13:37:12 -08:00
Will
25a5c3dec9 Pip install to library dir (#1432) 2018-03-16 16:12:05 +01:00
Wyn
c49cb4a213 [V3 Readme] Update Patreon link (#1434)
Add on to #1431
2018-03-14 19:22:50 -04:00
palmtree5
c4dbbc2d1e [V3 Warnings] Action list isn't a dict (fix #1382) (#1408) 2018-03-14 19:10:07 -04:00
palmtree5
fe3d6f57af [V3 Streams] Add support for Youtube streams (#1385) 2018-03-14 19:07:14 -04:00
palmtree5
052af2f9bf [V3 Cleanup] Code consolidation (#1347)
* [V3 Cleanup] refactor to consolidate duplicate code

* [V3 Cleanup] make the prompting function a staticmethod

* Drop continuing message + add punctuation to docstrings
2018-03-14 19:03:11 -04:00
Adam
16da9f52ac [V3 Audio] update Lavalink build (#1427) 2018-03-12 21:48:13 -08:00
palmtree5
22a342d36d [V3 Bank/Economy] Fix #1404 and an issue with [p]bank reset (#1407)
* [V3 Bank] fix an issue with checks

* [V3 Economy] fix issues with [p]bank reset
2018-03-12 19:10:46 -04:00
palmtree5
4fcf32b5e9 [V3 Bank] Add confirmation prompt on [p]bankset toggleglobal (#1402) 2018-03-12 19:05:21 -04:00
palmtree5
5bdb455bc0 [V3 Instance setup] Change backup time separator for Windows (#1419) 2018-03-12 18:48:13 -04:00
BaIthamel
1cb74f0ea7 [V3] Fix for issue #1363 (#1424)
[p]cogs and [p]repo now print alphabetically
2018-03-12 18:44:30 -04:00
Tobotimus
c7e8c95640 [V3] discord.Game -> discord.Activity (#1397)
* [V3] discord.Game -> discord.Activity

* Update userinfo to reference new enum
2018-03-12 18:41:37 -04:00
Will
ccb322d08e [Audio] V3/auto autostart only (#1420)
* Download jar at audio load

* Messy...

* Remove leftover log file stuff

* Keep application.yml

* Damn you windows
2018-03-12 00:49:08 +01:00
Wyn
b27e0f2d21 [V3 Audio] Rename Game to Activity (#1409)
* Rename `Game` to `Activity` for audio

Add on to pull #1397

* Update audio.py

Whoops, don't need this here

* Update audio.py

Now fixed
2018-03-08 20:55:03 -05:00
aikaterna
6a715d87dd [V3 Audio] Add prev command, bugfixes for audiostats, search (#1405)
* Update audiostats to display days in timer

* Add prev command

* Update search button to play enqueued song
2018-03-08 20:50:54 -05:00
Tobotimus
6138b78c07 [V3 Admin] Make [p]announce consume all args into the message (#1394)
* Fix announce (resolves #1390)

* Make other commands consume all args

Also fixes [p]announce channel
2018-03-08 20:45:41 -05:00
palmtree5
f84ef48819 [V3 Docs] add java install to install docs (#1389) 2018-03-08 20:06:27 +01:00
palmtree5
cda27944b6 [V3 Mod] fix #1401 (#1403) 2018-03-07 09:48:22 +11:00
Will
c9281f734b [V3 Config] Fix clear throwing errors (#1374) 2018-03-06 10:28:37 +11:00
palmtree5
f378ea0d2e [V3 Core] add update check (#1388)
* [V3 Core] add update check

* [V3 Core] have it DM the owner if out of date
2018-03-06 10:21:01 +11:00
James
40c37b5c06 [V3 Help][ fix help_formatter to obey length limits (#1375)
Help didn't account for docstrings passing length limits which I noticed a while ago and as noticed again when Palm forgot a dual newline in a command docstring.
This PR sees to fix this by enforcing length limits on description, field names and field values
2018-03-06 10:10:56 +11:00
Will
57b7db6956 [V3 Admin] Remove guild default channel (#1381)
* Remove guild default channel

* Fix weird set thing
2018-03-06 09:52:26 +11:00
Michael H
b4f5c2c0a1 Revert "[V3]Encoding issue fix" (#1392)
* Revert "[V3 Core] Encoding issue fix (#1365)"

This reverts commit f6903cf582.

* Don't let the system encoding screw with things,
specify opens as happening with utf-8 encoding

(cherry picked from commit c10e4dddca)
2018-03-06 08:18:41 +11:00
Michael H
f6903cf582 [V3 Core] Encoding issue fix (#1365)
* Don't let the system encoding screw with things,
specify opens as happening with utf-8 encoding

* And also deal with encoding issues because windows is a special snowflake
(see: #1366)

* let's just use the encoding param in str() rather than encode/decode...
2018-03-04 13:02:04 -05:00
aikaterna
3816385228 [V3 Audio] Fix repeat, Message deletions (#1379)
* Fix repeat

Also remove restriction on if the player is playing.

* Auto-delete existing Now Playing message

* Auto-delete existing notify message

* Wrap line on Now Playing message

* Add connected duration to audiostats

_dynamic_time based on a function written by Redjumpman

* Return negative seek past song start as 00:00:00

* Version number
2018-03-03 18:55:24 -05:00
Will
f65085946c [V3 Audio] Initial V3 addition (#1373)
* Initial audio

* Add application data and modify port

* Modify codeowners

* Need extra newline

* add yml to manifest

* lock lavalink version
2018-03-03 15:42:20 +11:00
Thomas Mercurio
b10b746d9e [V3 Config] Correct Mongo connection URI without credentials (#1362)
* Correct connection string without credentials

* Remove extra whitespace.
2018-03-02 18:39:45 +01:00
James
ed5945e182 fixed exception (#1372)
`requirements.remove` will raise a ValueError if the item is not there, not `IndexError`
2018-03-02 18:35:28 +01:00
Will
cf48a13fc7 Potentially fix auto deploy issues (#1357) 2018-02-28 13:08:47 +01:00
palmtree5
29d9bbad32 [V3] Bump version to 3.0.0b9 (#1348) 2018-02-26 11:49:48 -09:00
Will
004f42bf6e [V3 Config] Limit connections to Mongo DB (#1356) 2018-02-26 15:34:30 -05:00
Will
41e0d105f6 [V3 Config] Make Mongo work with any db (#1355) 2018-02-26 15:28:20 -05:00
Will
fdd61963e6 Add pip install command (#1354) 2018-02-26 11:21:41 -09:00
Will
10cbd4d3c4 [V3 Sentry] Only log errors that come from core code (#1353)
* Do not load core cogs as extensions

* Filter this shit
2018-02-26 15:16:49 -05:00
Will
64af7800dc [V3 Config] Adjust functionality of get_attr (#1342)
* Intermediate commit

* Add defaulting stuff to config

* Remove set_attr in favor of set_raw

* Modify get_attr

* Fix issue with clearing data
2018-02-26 11:13:01 -09:00
palmtree5
c428982c00 [V3 Core] Add listlocales command (#1351)
* [V3] Add listlocales command + remove a hanging 2 letter translation

* Sort the locales list

* Doc info in set locale
2018-02-26 15:05:06 -05:00
Will
1363bc3f43 [V3] Disregard limitations on repo names (#1349) 2018-02-25 21:21:13 -09:00
Michael H
09ddfe4250 [V3] Re-allow using presence modifying commands without being in a guild (#1345)
Actually update on all shards (we need to do this even with autoshardedbot as base)
2018-02-25 21:10:59 -09:00
Will
e13de0950c [V3 Config] Implement a true clear method (#1344)
* Add clear methods to drivers

* Update config clear methods, add to Value

* Add test
2018-02-25 21:07:28 -09:00
palmtree5
c1ac78eea4 [V3] Warning system (#1173)
* [V3 Warning] initial work on a warning system for v3

* [V3 Warning] rename some stuff and add a case type

* [V3 Warnings] rename package from warning

* [V3 Warnings] restructuring commands

* [V3 Warnings] remove expiry stuff + other refactoring

* [V3 Warnings] refactoring action logic

* [V3 Warnings] rewrites to action logic

* [V3 Warnings] add regen_messages.py
2018-02-25 20:14:38 -09:00
Kowlin
21de95e0a6 [CI] Added support for conditional builds and env vars (#1320)
* Changed travis deploy scheme

* Fixed indentation

* Okay NOW I did fix indentation (hopefully)

* Conditional deployment tests

* Fixed a 7:35 AM typo

* Fixed builds not building.
2018-02-25 20:10:55 -09:00
palmtree5
0593bb9c53 [V3 i18n] Update translations from Crowdin (#1350) 2018-02-25 21:57:14 -05:00
Will
bd1ce26dc7 Fix missing repos folder (#1330) 2018-02-25 16:40:09 +01:00
Will
2612e7c23a [V3 Config] Add more information to the docs (#1343)
* Attempt to determine the registered default...if any

* Intermediate commit

* Add more doc information
2018-02-25 14:56:12 +01:00
Will
93ca7abc1a [V3 Core Commands] Limit status modifying commands to be run in guild only (#1331)
* Limit status modifying commands to be run in guild only

* JK let em run.

* Add a space
2018-02-23 02:44:06 +01:00
Will
de4af14676 Fix unreferenced tmp variable (#1334) 2018-02-23 02:29:04 +01:00
Will
c9a6c0ffcc Converters don't work the way I think they do (#1336)
(No they don't Will -- Kowlin)
2018-02-23 02:21:39 +01:00
Will
d414806fa2 Close aiohttp ClientSession (#1340) 2018-02-23 02:08:49 +01:00
Will
d54c129c57 [V3 Config] Allow users to directly specify a cog name with config (#1339) 2018-02-22 19:42:30 -05:00
Will
7c848153f8 [V3 Config] Limit config objects to a single one per cog (#1337)
* Limit config objects to a single one per cog

* do it correctly

* Do nicer thing

* do it right...

* I will get this right eventually
2018-02-22 19:36:07 -05:00
Will
4e36c2f82d [V3 Config] Add helper methods for advanced data access (#1335)
* Add get_raw/set_raw

* Add default to get_raw

* Add custom group method to the config object

* Add more methods for custom groups

* Add some docstrings

* Deepcopy the result of get_raw, throw TypeError if no value is passed to set_raw

* Do it right..

* Better way to require kwarg
2018-02-23 11:29:37 +11:00
Sebass13
b5c71bc59c [V3 Mod/Filter] Fix #1202 (#1327)
* Fix #1326

Checks to see if `author` is a `valid_user` (of `Member` class) before checking to see if the bot `is_mod_or_superior` to the `author`.

* Fix #1202

Raises `TypeError` when `User` objects are passed into `is_mod_or_superior` or `is_admin_or_superior`, as only `Member` objects have a `guild` attribute.

* Fixes #1202

Checks to see if `author` is a `valid_user` (of `Member` class) before checking to see if the bot `is_mod_or_superior` to the `author`.
2018-02-21 18:36:13 -05:00
Sebass13
d20724d7b2 [V3 General] Fix error in [p]userinfo when game is not set (#1325)
* Fix #1321

Modifies the game-checking lines so that they don't assume `user.game` is not a NoneType object.

* Fix #1321

Modifies the game-checking lines so that they don't assume user.game is not a NoneType object. Also alerts the user to go bother @tekulvw if somehow the invariants of `user` having a `game` attribute and the `game` attribute either being `None` of having a `type` attribute in `[0, 1, 2, 3]` are broken.

* Update general.py
2018-02-20 18:06:06 -05:00
Sebass13
1cca5ee5cb [V3 Downloader] Fixes issue #1323 (#1324)
The use of `popitem` makes the right side of line 642 return a tuple of the form `(repo, (old, new))` instead of a dictionary of the form `{repo: (old, new)}`, as expected by the left hand side of the same line.
2018-02-19 22:41:19 -05:00
867 changed files with 234475 additions and 11060 deletions

17
.github/CODEOWNERS vendored
View File

@@ -9,23 +9,27 @@ redbot/core/config.py @tekulvw
redbot/core/cog_manager.py @tekulvw
redbot/core/core_commands.py @tekulvw
redbot/core/context.py @Tobotimus
redbot/core/commands/* @mikeshardmind
redbot/core/data_manager.py @tekulvw
redbot/core/dev_commands.py @tekulvw
redbot/core/drivers/* @tekulvw
redbot/core/events.py @tekulvw
redbot/core/global_checks.py @tekulvw
redbot/core/i18n.py @tekulvw
redbot/core/json_io.py @tekulvw
redbot/core/modlog.py @palmtree5
redbot/core/rpc.py @tekulvw
redbot/core/sentry_setup.py @Kowlin @tekulvw
redbot/core/utils/chat_formatting.py @tekulvw
redbot/core/utils/mod.py @palmtree5
redbot/core/utils/data_converter.py @mikeshardmind
redbot/core/utils/antispam.py @mikeshardmind
redbot/core/utils/tunnel.py @mikeshardmind
redbot/core/utils/caching.py @mikeshardmind
redbot/core/utils/common_filters.py @mikeshardmind
# Cogs
redbot/cogs/admin/* @tekulvw
redbot/cogs/alias/* @tekulvw
redbot/cogs/audio/* @tekulvw
redbot/cogs/audio/* @aikaterna
redbot/cogs/bank/* @tekulvw
redbot/cogs/cleanup/* @palmtree5
redbot/cogs/customcom/* @palmtree5
@@ -38,6 +42,9 @@ redbot/cogs/mod/* @palmtree5
redbot/cogs/modlog/* @palmtree5
redbot/cogs/streams/* @Twentysix26 @palmtree5
redbot/cogs/trivia/* @Tobotimus
redbot/cogs/reports/* @mikeshardmind
redbot/cogs/permissions/* @mikeshardmind
redbot/cogs/warnings/* @palmtree5
# Docs
docs/* @tekulvw @palmtree5
@@ -47,3 +54,7 @@ setup.py @tekulvw
redbot/__init__.py @tekulvw
redbot/__main__.py @tekulvw
redbot/setup.py @tekulvw
# Others
.travis.yml @Kowlin
crowdin.yml @Kowlin

View File

@@ -1,23 +1,43 @@
# Introduction
### Welcome!
First off, thank you for contributing to the further development of Red. We're always looking for new ways to improve our project and we appreciate any help you can give us.
# Contents
* [1. Introduction](#1-introduction)
* [1.1 Why do these guidelines exist?](#11-why-do-these-guidelines-exist)
* [1.2 What kinds of contributions are we looking for?](#12-what-kinds-of-contributions-are-we-looking-for)
* [2. Ground Rules](#2-ground-rules)
* [3. Your First Contribution](#3-your-first-contribution)
* [4. Getting Started](#4-getting-started)
* [4.1 Setting up your development environment](#41-setting-up-your-development-environment)
* [4.2 Testing](#42-testing)
* [4.3 Style](#43-style)
* [4.4 Make](#44-make)
* [4.5 Keeping your dependencies up to date](#45-keeping-your-dependencies-up-to-date)
* [4.6 To contribute changes](#46-to-contribute-changes)
* [4.7 How To Report A Bug](#47-how-to-report-a-bug)
* [4.8 How To Suggest A Feature Or Enhancement](#48-how-to-suggest-a-feature-or-enhancement)
* [5. Code Review Process](#5-code-review-process)
* [5.1 Issues](#51-issues)
* [5.2 Pull Requests](#52-pull-requests)
* [5.3 Differences between "new features" and "improvements"](#53-differences-between-new-features-and-improvements)
* [6. Community](#6-community)
### Why do these guidelines exist?
# 1. Introduction
**Welcome!** First off, thank you for contributing to the further development of Red. We're always looking for new ways to improve our project and we appreciate any help you can give us.
### 1.1 Why do these guidelines exist?
Red is an open source project. This means that each and every one of the developers and contributors who have helped make Red what it is today have done so by volunteering their time and effort. It takes a lot of time to coordinate and organize issues and new features and to review and test pull requests. By following these guidelines you will help the developers streamline the contribution process and save them time. In doing so we hope to get back to each and every issue and pull request in a timely manner.
### What kinds of contributions are we looking for?
### 1.2 What kinds of contributions are we looking for?
We love receiving contributions from our community. Any assistance you can provide with regards to bug fixes, feature enhancements, and documentation is more than welcome.
# Ground Rules
# 2. Ground Rules
We've made a point to use [ZenHub](https://www.zenhub.com/) (a plugin for GitHub) as our main source of collaboration and coordination. Your experience contributing to Red will be greatly improved if you go get that plugin.
1. Ensure cross compatibility for Windows, Mac OS and Linux.
2. Ensure all Python features used in contributions exist and work in Python 3.5 and above.
2. Ensure all Python features used in contributions exist and work in Python 3.7 and above.
3. Create new tests for code you add or bugs you fix. It helps us help you by making sure we don't accidentally break anything :grinning:
4. Create any issues for new features you'd like to implement and explain why this feature is useful to everyone and not just you personally.
5. Don't add new cogs unless specifically given approval in an issue discussing said cog idea.
6. Be welcoming to newcomers and encourage diverse new contributors from all backgrounds. See [Python Community Code of Conduct](https://www.python.org/psf/codeofconduct/).
# Your First Contribution
# 3. Your First Contribution
Unsure of how to get started contributing to Red? Please take a look at the Issues section of this repo and sort by the following labels:
* beginner - issues that can normally be fixed in just a few lines of code and maybe a test or two.
@@ -27,35 +47,92 @@ Unsure of how to get started contributing to Red? Please take a look at the Issu
At this point you're ready to start making changes. Feel free to ask for help; everyone was a beginner at some point!
# Getting Started
### Testing
We've recently started adding unit-testing into Red. All current tests can be found in the `tests/` directory at the root level of the repository. You will need `py.test` installed in order to run them (which is already in `requirement.txt`). Tests can be run by simply calling `pytest` once you've `cd`'d into the Red repository folder.
# 4. Getting Started
### To contribute changes
1. Create your own fork of the Red repository.
2. Make the changes in your own fork.
Red's repository is configured to follow a particular development workflow, using various reputable tools. We kindly ask that you stick to this workflow when contributing to Red, by following the guides below. This will help you to easily produce quality code, identify errors early, and streamline the code review process.
### 4.1 Setting up your development environment
The following requirements must be installed prior to setting up:
- Python 3.7.0 or greater
- git
- pip
If you're not on Windows, you should also have GNU make installed, and you can optionally install [pyenv](https://github.com/pyenv/pyenv), which can help you run tests for different python versions.
1. Fork and clone the repository to a directory on your local machine.
2. Open a command line in that directory and execute the following command:
```bash
make newenv
```
Red, its dependencies, and all required development tools, are now installed to a virtual environment located in the `.venv` subdirectory. Red is installed in editable mode, meaning that edits you make to the source code in the repository will be reflected when you run Red.
3. Activate the new virtual environment with one of the following commands:
- Posix:
```bash
source .venv/bin/activate
```
- Windows:
```powershell
.venv\Scripts\activate
```
Each time you open a new command line, you should execute this command first. From here onwards, we will assume you are executing commands from within this activated virtual environment.
**Note:** If you're comfortable with setting up virtual environments yourself and would rather do it manually, just run `pip install -Ur tools/dev-requirements.txt` after setting it up.
### 4.2 Testing
We've recently started using [tox](https://github.com/tox-dev/tox) to run all of our tests. It's extremely simple to use, and if you followed the previous section correctly, it is already installed to your virtual environment.
Currently, tox does the following, creating its own virtual environments for each stage:
- Runs all of our unit tests with [pytest](https://github.com/pytest-dev/pytest) on python 3.7 (test environment `py37`)
- Ensures documentation builds without warnings, and all hyperlinks have a valid destination (test environment `docs`)
- Ensures that the code meets our style guide with [black](https://github.com/ambv/black) (test environment `style`)
To run all of these tests, just run the command `tox` in the project directory.
To run a subset of these tests, use the command `tox -e <env>`, where `<env>` is the test environment you want tox to run. The test environments are noted in the dot points above.
Your PR will not be merged until all of these tests pass.
### 4.3 Style
Our style checker of choice, [black](https://github.com/ambv/black), actually happens to be an auto-formatter. The checking functionality simply detects whether or not it would try to reformat something in your code, should you run the formatter on it. For this reason, we recommend using this tool as a formatter, regardless of any disagreements you might have with the style it enforces.
Use the command `black --help` to see how to use this tool. The full style guide is explained in detail on [black's GitHub repository](https://github.com/ambv/black). **There is one exception to this**, however, which is that we set the line length to 99, instead of black's default 88. When using `black` on the command line, simply use it like so: `black -l 99 -N <src>`.
### 4.4 Make
You may have noticed we have a `Makefile` and a `make.bat` in the top-level directory. For now, you can do three things with them:
1. `make reformat`: Reformat all python files in the project with Black
2. `make stylecheck`: Check if any `.py` files in the project need reformatting
3. `make newenv`: Set up a new virtual environment in the `.venv` subdirectory, and install Red and its dependencies. If one already exists, it is cleared out and replaced.
4. `make syncenv`: Sync your environment with Red's latest dependencies.
### 4.5 Keeping your dependencies up to date
Whenever you pull from upstream (V3/develop on the main repository) and you notice either of the files `setup.cfg` or `tools/dev-requirements.txt` have been changed, it can often mean some package dependencies have been updated, added or removed. To make sure you're testing and formatting with the most up-to-date versions of our dependencies, run `make syncenv`. You could also simply do `make newenv` to install them to a clean new virtual environment.
### 4.6 To contribute changes
1. Create a new branch on your fork
2. Make the changes
3. If you like the changes and think the main Red project could use it:
* Ensure your code follows (generally) the PEP8 Python style guide
* Run tests with `tox` to ensure your code is up to scratch
* Create a Pull Request on GitHub with your changes
### How To Report A Bug
### 4.7 How To Report A Bug
Please see our **ISSUES.MD** for more information.
### How To Suggest A Feature Or Enhancement
### 4.8 How To Suggest A Feature Or Enhancement
The goal of Red is to be as useful to as many people as possible, this means that all features must be useful to anyone and any server that uses Red.
If you find yourself wanting a feature that Red does not already have, you're probably not alone. There's bound to be a great number of users out there needing the same thing and a lot of the features that Red has today have been added because of the needs of our users. Open an issue on our issues list and describe the feature you would like to see, how you would use it, how it should work, and why it would be useful to the Red community as a whole.
# Code Review Process
# 5. Code Review Process
We have a core team working tirelessly to implement new features and fix bugs for the Red community. This core team looks at and evaluates new issues and PRs on a daily basis.
The decisions we make are based on a simple majority of that team or by decree of the project owner.
### Issues
### 5.1 Issues
Any new issues will be looked at and evaluated for validity of a bug or for the usefulness of a suggested feature. If we have questions about your issue we will get back as soon as we can (usually in a day or two) and will try to make a decision within a week.
### Pull Requests
### 5.2 Pull Requests
Pull requests are evaluated by their quality and how effectively they solve their corresponding issue. The process for reviewing pull requests is as follows:
1. A pull request is submitted
@@ -66,10 +143,10 @@ Pull requests are evaluated by their quality and how effectively they solve thei
4. If any feedback is given we expect a response within 1 week or we may decide to close the PR.
5. If your pull request is not vetoed and no core member requests changes then it will be approved and merged into the project.
### Differences between "new features" and "improvements"
### 5.3 Differences between "new features" and "improvements"
The difference between a new feature and improvement can be quite fuzzy and the project owner reserves all rights to decide under which category your PR falls.
At a very basic level a PR is a new feature if it changes the intended way any part of the Red project currently works or if it modifies the user experience (UX) in any significant way. Otherwise, it is likely to be considered an improvement.
# Community
# 6. Community
You can chat with the core team and other community members about issues or pull requests in the #coding channel of the Red support server located [here](https://discord.gg/red).

3
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,3 @@
# These are supported funding model platforms
patreon: Red_Devs

View File

@@ -1,20 +1,5 @@
Please be sure to read through other issues as well to make sure what you are suggesting/reporting has not already
been suggested/reported
### Type:
- [ ] Suggestion
- [ ] Bug
### Brief description of the problem
### Expected behavior
### Actual behavior
### Steps to reproduce
1.
2.
3.
4.
<!--
Please be sure to use the correct template,
if your report doesn't have the correct template please open an issue describing your issue in detail
For support regarding the bot itself please visit the discord server over at https://discord.gg/red
-->

View File

@@ -0,0 +1,20 @@
Please be sure to read through other issues as well to make sure what you are suggesting/reporting has not already
been suggested/reported
### Type:
- [ ] Suggestion
- [ ] Bug
### Brief description of the problem
### Expected behavior
### Actual behavior
### Steps to reproduce
1.
2.
3.
4.

31
.github/ISSUE_TEMPLATE/command_bug.md vendored Normal file
View File

@@ -0,0 +1,31 @@
---
name: Bug reports for commands
about: For bugs that involve commands found within Red
---
# Command bugs
<!--
Did you find a bug with a command? Fill out the following:
-->
#### Command name
<!-- Replace this line with the name of the command -->
#### What cog is this command from?
<!-- Replace this line with the name of the cog -->
#### What were you expecting to happen?
<!-- Replace this line with a description of what you were expecting to happen -->
#### What actually happened?
<!-- Replace this line with a description of what actually happened. Include any error messages -->
#### How can we reproduce this issue?
<!-- Replace with numbered steps to reproduce the issue -->

41
.github/ISSUE_TEMPLATE/feature_req.md vendored Normal file
View File

@@ -0,0 +1,41 @@
---
name: Feature request
about: For feature requests regarding Red itself.
---
# Feature request
<!-- This template is for feature requests. Please fill out the following: -->
#### Select the type of feature you are requesting:
<!-- To check a box, replace the space between the [] with a x -->
- [ ] Cog
- [ ] Command
- [ ] API functionality
#### Describe your requested feature
<!--
Feel free to describe in as much detail as you wish.
If you are requesting a cog to be included in core:
- Describe the functionality in as much detail as possible
- Include the command structure, if possible
- Please note that unless it's something that should be core functionality,
we reserve the right to reject your suggestion and point you to our cog
board to request it for a third-party cog
If you are requesting a command:
- Include what cog it should be in and a name for the command
- Describe the intended functionality for the command
- Note any restrictions on who can use the command or where it can be used
If you are requesting API functionality:
- Describe what it should do
- Note whether it is to extend existing functionality or introduce new functionality
-->

27
.github/ISSUE_TEMPLATE/other_bug.md vendored Normal file
View File

@@ -0,0 +1,27 @@
---
name: Bug report
about: For bugs that don't involve a command.
---
# Other bugs
<!--
Did you find a bug with something other than a command? Fill out the following:
-->
#### What were you trying to do?
<!-- Replace this line with a description of what you were trying to do -->
#### What were you expecting to happen?
<!-- Replace this line with a description of what you were expecting to happen -->
#### What actually happened?
<!-- Replace this line with a description of what actually happened. Include any error messages -->
#### How can we reproduce this issue?
<!-- Replace with numbered steps to reproduce the issue -->

View File

@@ -0,0 +1,7 @@
### Type
- [ ] Bugfix
- [ ] Enhancement
- [ ] New feature
### Description of the changes

15
.github/PULL_REQUEST_TEMPLATE/bugfix.md vendored Normal file
View File

@@ -0,0 +1,15 @@
# Bugfix request
<!--
THIS TEMPLATE IS CURRENTLY UNUSED DUE TO GITHUB LIMITATIONS!
To be used for pull requests that fix a bug
-->
#### Describe the bug being fixed
<!--
If an issue exists for the bug, mention
that this PR fixes that issue
-->
#### Anything we need to know about this fix?

View File

@@ -0,0 +1,21 @@
# Enhancement request
<!--
THIS TEMPLATE IS CURRENTLY UNUSED DUE TO GITHUB LIMITATIONS!
To be used for PRs which enhance existing features
-->
#### Describe the enhancement
<!--
Describe what your changes do.
If adding commands, describe any restrictions on their usage.
- For example, who can use the command? Where can it be used?
-->
#### Does this enhancement break existing functionality?
<!-- To check a box, replace the space between the [] with a x -->
- [ ] Yes
- [ ] No

View File

@@ -0,0 +1,22 @@
# New feature addition
<!--
THIS TEMPLATE IS CURRENTLY UNUSED DUE TO GITHUB LIMITATIONS!
To be used for PRs which add a new feature
Examples of this include new APIs, new core cogs, etc.
-->
#### What type of feature is this?
<!-- To check a box, replace the space between the [] with a x -->
- [ ] New core cog
- [ ] New API
- [ ] Other
#### Describe the feature
<!--
If you are adding a cog, describe its commands in detail (functionality, usage restrictions, etc).
If the new feature introduces new requirements, please try to explain why they are necessary.
-->

View File

@@ -0,0 +1,16 @@
# New release
<!--
THIS TEMPLATE IS CURRENTLY UNUSED DUE TO GITHUB LIMITATIONS!
To be used by collaborators for doing releases.
Most contributors will not need to use this.
-->
#### Version
#### Has a draft release been created for this?
- [ ] Yes
- [ ] No

View File

@@ -0,0 +1,6 @@
# Translations update
<!--
THIS TEMPLATE IS CURRENTLY UNUSED DUE TO GITHUB LIMITATIONS!
Used for PRs updating translations from Crowdin
-->

34
.gitignore vendored
View File

@@ -1,40 +1,18 @@
# Trivia list repo injection
redbot/trivia/
*.json
*.exe
*.dll
*.pot
.data
!/tests/cogs/dataconverter/data/**/*.json
Pipfile
Pipfile.lock
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
# Gradle:
.idea/**/gradle.xml
.idea/**/libraries
# CMake
cmake-build-debug/
# Mongo Explorer plugin:
.idea/**/mongoSettings.xml
## File-based project format:
.idea/
*.iws
## Plugin-specific files:
@@ -156,3 +134,5 @@ ENV/
# mypy
.mypy_cache/
# pytest
.pytest_cache/

148
.pylintrc Normal file
View File

@@ -0,0 +1,148 @@
[MASTER]
# Specify a configuration file.
#rcfile=
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=pytest
# Pickle collected data for later comparisons.
persistent=no
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=
# DO NOT CHANGE THIS VALUE # Use multiple processes to speed up Pylint.
jobs=1
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=
# Allow optimization of some AST trees. This will activate a peephole AST
# optimizer, which will apply various small optimizations. For instance, it can
# be used to obtain the result of joining multiple strings with the addition
# operator. Joining a lot of strings can lead to a maximum recursion error in
# Pylint and this flag can prevent that. It has one side effect, the resulting
# AST will be different than the one from reality.
optimize-ast=no
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
confidence=
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time. See also the "--disable" option for examples.
enable=all
disable=C, # black is enforcing this for us already, incompatibly
W, # unbroaden this to the below specifics later on.
W0107, # uneccessary pass is stylisitc in most places
W0212, # Should likely refactor around protected access warnings later
W1203, # fstrings are too fast to care about enforcing this.
W0612, # unused vars can sometimes indicate an issue, but ...
W1401, # Should probably fix the reason this is disabled (start up screen)
W0511, # Nope, todos are fine for future people to see things to do.
W0613, # Too many places where we need to take unused args do to d.py ... also menus
W0221, # Overriden converters.
W0223, # abstractmethod not defined in mixins is expected
I, # ...
R # While some of these have merit, It's too large a burden to enable this right now.
[REPORTS]
output-format=parseable
files-output=no
reports=no
[LOGGING]
# Logging modules to check that the string format arguments are in logging
# function parameter format
logging-modules=logging
[TYPECHECK]
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes
# TODO: Write a plyint plugin to allow this with these mixin classes
# To use the abstractmethod we know will be defined in the final class.
ignored-classes=redbot.cogs.mod.movetocore.MoveToCore,
redbot.cogs.mod.kickban.KickBanMixin,
redbot.cogs.mod.mutes.MuteMixin,
redbot.cogs.mod.names.ModInfo,
redbot.cogs.mod.settings.ModSettings,
redbot.cogs.mod.events.Events
ignored-modules=distutils # https://github.com/PyCQA/pylint/issues/73
[VARIABLES]
# Tells whether we should check for unused import in __init__ files.
init-import=no
# A regular expression matching the name of dummy variables (i.e. expectedly
# not used).
dummy-variables-rgx=_$|dummy
[SIMILARITIES]
# Minimum lines number of a similarity.
min-similarity-lines=4
# Ignore comments when computing similarities.
ignore-comments=yes
# Ignore docstrings when computing similarities.
ignore-docstrings=yes
# Ignore imports when computing similarities.
ignore-imports=no
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,XXX,TODO
[CLASSES]
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,__new__,__call__
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=mcs
# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=
[EXCEPTIONS]
# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception,discord.DiscordException

17
.readthedocs.yml Normal file
View File

@@ -0,0 +1,17 @@
version: 2
formats:
- pdf
build:
image: latest
python:
version: 3.7
install:
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:
- docs
- mongo

View File

@@ -1,42 +1,60 @@
dist: trusty
dist: xenial
language: python
python:
- 3.5.3
- 3.6.1
install:
- echo "pytest>3" >> requirements.txt
- echo "pytest-asyncio" >> requirements.txt
- echo "git+https://github.com/Rapptz/discord.py.git@rewrite#egg=discord.py[voice]"
>> requirements.txt
- pip install -r requirements.txt
- pip install .
script:
- python -m compileall ./redbot/cogs
- python -m pytest
before_deploy:
- curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
- echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
- sudo apt-get update -qq
- sudo apt-get install -y crowdin
deploy:
- provider: pypi
user: Red-DiscordBot
password:
secure: Ty9vYnd/wCuQkVC/OsS4E2jT9LVDVfzsFrQc4U2hMYcTJnYbl/3omyObdCWCOBC40vUDkVHAQU8ULHzoCA+2KX9Ds/7/P5zCumAA0uJRR9Smw7OlRzSMxJI+/lGq4CwXKzxDZKuo5rsxXEbW5qmYjtO8Mk6KuLkvieb1vyr2DcqWEFzg/7TZNDfD1oP8et8ITQ26lLP1dtQx/jlAiIBzgK9wziuwj1Divb9A///VsGz43N8maZ+jfsDjYqrfUVWTy3ar7JPUplletenYCR1PmQ5C46XfV0kitKd1aITJ48YPAKyYgKy8AIT+Uz1JArTnqdzLSFRNELS57qS00lzgllbteCyWQ8Uzy0Zpxb/5DDH8/mL1n0MyJrF8qjZd2hLNAXg3z/k9bGXeiMLGwoxRlGXkL2XpiVgI93UKKyVyooGNMgPTc/QdSc7krjAWcOtX/HgLR34jxeLPFEdzJNAFIimfDD8N+XTFcNBw6EvOYm/n5MXkckNoX/G+ThNobHZ7VKSASltZ9zBRAJ2dDh35G3CYmVEk33U77RKbL9le/Za9QVBcAO8i6rqVGYkdO7thHHKHc/1CB1jNnjsFSDt0bURtNfAqfwKCurQC8487zbEzT+2fog3Wygv7g3cklaRg4guY8UjZuFWStYGqbroTsOCd9ATNqeO5B13pNhllSzU=
skip_cleanup: true
on:
repo: Cog-Creators/Red-DiscordBot
branch: V3/develop
python: 3.5.3
tags: true
- provider: script
script: python3 ./generate_strings.py
skip_cleanup: true
on:
repo: Cog-Creators/Red-DiscordBot
branch: V3/develop
python: 3.5.3
tags: true
cache: pip
notifications:
email: false
python:
- 3.7.2
env:
global:
- PIPENV_IGNORE_VIRTUALENVS=1
matrix:
- TOXENV=py
- TOXENV=docs
- TOXENV=style
install:
- pip install --upgrade pip tox
script:
- tox
jobs:
include:
# These jobs only occur on tag creation if the prior ones succeed
- stage: PyPi Deployment
if: tag IS present
python: 3.7.2
env:
- DEPLOYING=true
- TOXENV=py36
deploy:
- provider: pypi
distributions: sdist bdist_wheel
user: Red-DiscordBot
password:
secure: Ty9vYnd/wCuQkVC/OsS4E2jT9LVDVfzsFrQc4U2hMYcTJnYbl/3omyObdCWCOBC40vUDkVHAQU8ULHzoCA+2KX9Ds/7/P5zCumAA0uJRR9Smw7OlRzSMxJI+/lGq4CwXKzxDZKuo5rsxXEbW5qmYjtO8Mk6KuLkvieb1vyr2DcqWEFzg/7TZNDfD1oP8et8ITQ26lLP1dtQx/jlAiIBzgK9wziuwj1Divb9A///VsGz43N8maZ+jfsDjYqrfUVWTy3ar7JPUplletenYCR1PmQ5C46XfV0kitKd1aITJ48YPAKyYgKy8AIT+Uz1JArTnqdzLSFRNELS57qS00lzgllbteCyWQ8Uzy0Zpxb/5DDH8/mL1n0MyJrF8qjZd2hLNAXg3z/k9bGXeiMLGwoxRlGXkL2XpiVgI93UKKyVyooGNMgPTc/QdSc7krjAWcOtX/HgLR34jxeLPFEdzJNAFIimfDD8N+XTFcNBw6EvOYm/n5MXkckNoX/G+ThNobHZ7VKSASltZ9zBRAJ2dDh35G3CYmVEk33U77RKbL9le/Za9QVBcAO8i6rqVGYkdO7thHHKHc/1CB1jNnjsFSDt0bURtNfAqfwKCurQC8487zbEzT+2fog3Wygv7g3cklaRg4guY8UjZuFWStYGqbroTsOCd9ATNqeO5B13pNhllSzU=
skip_cleanup: true
on:
repo: Cog-Creators/Red-DiscordBot
tags: true
- stage: Crowdin Deployment
if: tag IS present
python: 3.7.2
env:
- DEPLOYING=true
- TOXENV=py36
before_deploy:
- curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
- echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
- sudo apt-get update -qq
- sudo apt-get install -y crowdin
- pip install redgettext==3.1
deploy:
- provider: script
script: make upload_translations
skip_cleanup: true
on:
repo: Cog-Creators/Red-DiscordBot
tags: true

32
LICENSE
View File

@@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Red - A fully customizable Discord bot
Copyright (C) 2015-2018 Twentysix
Copyright (C) 2015-2019 Twentysix
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Red-DiscordBot Copyright (C) 2015-2018 Twentysix
Red-DiscordBot Copyright (C) 2015-2019 Twentysix
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
@@ -672,3 +672,31 @@ may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
The Red-DiscordBot project contains subcomponents in audio.py that have a
separate copyright notice and license terms. Your use of the source code for
these subcomponents is subject to the terms and conditions of the following
licenses.
This product bundles methods from https://github.com/Just-Some-Bots/MusicBot/
blob/master/musicbot/spotify.py which are available under an MIT license.
Copyright (c) 2015-2018 Just-Some-Bots (https://github.com/Just-Some-Bots)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
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.

View File

@@ -1,4 +0,0 @@
include README.rst
include LICENSE
include requirements.txt
include discord/bin/*.dll

26
Makefile Normal file
View File

@@ -0,0 +1,26 @@
# Python Code Style
reformat:
black -l 99 `git ls-files "*.py"`
stylecheck:
black --check -l 99 `git ls-files "*.py"`
# Translations
gettext:
redgettext --command-docstrings --verbose --recursive redbot --exclude-files "redbot/pytest/**/*"
upload_translations:
$(MAKE) gettext
crowdin upload sources
download_translations:
crowdin download
# Dependencies
bumpdeps:
python tools/bumpdeps.py
# Development environment
newenv:
python3.7 -m venv --clear .venv
.venv/bin/pip install -U pip setuptools
$(MAKE) syncenv
syncenv:
.venv/bin/pip install -Ur ./tools/dev-requirements.txt

133
README.md Normal file
View File

@@ -0,0 +1,133 @@
<h1 align="center">
<br>
<a href="https://github.com/Cog-Creators/Red-DiscordBot/tree/V3/develop"><img src="https://imgur.com/pY1WUFX.png" alt="Red - Discord Bot"></a>
<br>
Red Discord Bot
<br>
</h1>
<h4 align="center">Music, Moderation, Trivia, Stream Alerts and Fully Modular.</h4>
<p align="center">
<a href="https://discord.gg/red">
<img src="https://discordapp.com/api/guilds/133049272517001216/widget.png?style=shield" alt="Discord Server">
</a>
<a href="https://www.patreon.com/Red_Devs">
<img src="https://img.shields.io/badge/Support-Red!-yellow.svg" alt="Support Red on Patreon!">
</a>
<a href="https://www.python.org/downloads/">
<img src="https://img.shields.io/badge/Made%20With-Python%203.7-blue.svg?style=for-the-badge" alt="Made with Python 3.7">
</a>
<a href="https://crowdin.com/project/red-discordbot">
<img src="https://d322cqt584bo4o.cloudfront.net/red-discordbot/localized.svg" alt="Localized with Crowdin">
</a>
<a href="https://github.com/Rapptz/discord.py/">
<img src="https://img.shields.io/badge/discord-py-blue.svg" alt="discord.py">
</a>
</p>
<p align="center">
<a href="https://travis-ci.com/Cog-Creators/Red-DiscordBot">
<img src="https://api.travis-ci.com/Cog-Creators/Red-DiscordBot.svg?branch=V3/develop" alt="Travis CI">
</a>
<a href="http://red-discordbot.readthedocs.io/en/stable/?badge=stable">
<img src="https://readthedocs.org/projects/red-discordbot/badge/?version=stable" alt="Red on readthedocs.org">
</a>
<a href="https://github.com/ambv/black">
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code Style: Black">
</a>
<a href="http://makeapullrequest.com">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg">
</a>
</p>
<p align="center">
<a href="#overview">Overview</a>
<a href="#installation">Installation</a>
<a href="http://red-discordbot.readthedocs.io/en/stable/index.html">Documentation</a>
<a href="#plugins">Plugins</a>
<a href="#join-the-community">Community</a>
<a href="#license">License</a>
</p>
# Overview
Red is a fully modular bot meaning all features and commands can be enabled/disabled to your
liking, making it completely customizable. This is also a *self-hosted bot* meaning you will need
to host and maintain your own instance. You can turn Red into an admin bot, music bot, trivia bot,
new best friend or all of these together!
[Installation](#installation) is easy, and you do **NOT** need to know anything about coding! Aside
from installation and updating, every part of the bot can be controlled from within Discord.
**The default set of modules includes and is not limited to:**
- Moderation features (kick/ban/softban/hackban, mod-log, filter, chat cleanup)
- Trivia (lists are included and can be easily added)
- Music features (YouTube, SoundCloud, local files, playlists, queues)
- Stream alerts (Twitch, Youtube, Mixer, Hitbox, Picarto)
- Bank (slot machine, user credits)
- Custom commands
- Imgur/gif search
- Admin automation (self-role assignment, cross-server announcements, mod-mail reports)
- Customisable command permissions
**Additionally, other [plugins](#plugins) (cogs) can be easily found and added from our growing
community of cog repositories.**
# Installation
**The following platforms are officially supported:**
- [Windows](https://red-discordbot.readthedocs.io/en/stable/install_windows.html)
- [MacOS](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
- [Ubuntu](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
- [Debian Stretch](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
- [CentOS 7](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
- [Arch Linux](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
- [Raspbian Stretch](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
If after reading the guide you are still experiencing issues, feel free to join the
[Official Discord Server](https://discord.gg/red) and ask in the **#support** channel for help.
# Plugins
Red is fully modular, allowing you to load and unload plugins of your choice, and install 3rd party
plugins directly from Discord! A few examples are:
- Cleverbot integration (talk to Red and she talks back)
- Ban sync
- Welcome messages
- Casino
- Reaction roles
- Slow Mode
- AniList
- And much, much more!
Feel free to take a [peek](https://cogboard.red/t/approved-repositories/210) at a list of
available 3rd party cogs!
# Join the community!
**Red** is in continuous development, and its supported by an active community which produces new
content (cogs/plugins) for everyone to enjoy. New features are constantly added. If you cant
[find](https://cogboard.red/t/approved-repositories/210) the cog youre looking for,
consult our [guide](https://red-discordbot.readthedocs.io/en/stable/guide_cog_creation.html) on
building your own cogs!
Join us on our [Official Discord Server](https://discord.gg/red)!
# License
Released under the [GNU GPL v3](https://www.gnu.org/licenses/gpl-3.0.en.html) license.
Red is named after the main character of "Transistor", a video game by
[Super Giant Games](https://www.supergiantgames.com/games/transistor/).
Artwork created by [Sinlaire](https://sinlaire.deviantart.com/) on Deviant Art for the Red Discord
Bot Project.

View File

@@ -1,38 +0,0 @@
.. image:: https://readthedocs.org/projects/red-discordbot/badge/?version=v3-develop
:target: http://red-discordbot.readthedocs.io/en/v3-develop/?badge=v3-develop
:alt: Documentation Status
.. image:: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
:target: http://makeapullrequest.com
:alt: PRs Welcome
.. image:: https://d322cqt584bo4o.cloudfront.net/red-discordbot/localized.svg
:target: https://crowdin.com/project/red-discordbot
:alt: Crowdin
********************
Red - Discord Bot v3
********************
**This is in beta and very much a work in progress. Regular use is not recommended.
There will not be any effort made to prevent the breaking of current installations.**
How to install
^^^^^^^^^^^^^^
Using python3 pip::
pip install --process-dependency-links -U Red-DiscordBot
redbot-setup
redbot <name>
To install requirements for voice::
pip install --process-dependency-links -U Red-DiscordBot[voice]
To install all requirements for docs and tests::
pip install --process-dependency-links -U Red-DiscordBot[test,docs]
For the latest git build, replace ``Red-DiscordBot`` in the above commands with
``git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop``.

View File

@@ -1,5 +1,8 @@
api_key_env: CROWDIN_API_KEY
project_identifier_env: CROWDIN_PROJECT_ID
base_path: ./redbot/
files:
- source: /**/*.pot
- source: cogs/**/messages.pot
translation: /%original_path%/%locale%.po
- source: core/**/messages.pot
translation: /%original_path%/%locale%.po

View File

@@ -0,0 +1,62 @@
.. systemd service guide
==============================================
Setting up auto-restart using systemd on Linux
==============================================
-------------------------
Creating the service file
-------------------------
Create the new service file:
:code:`sudo -e /etc/systemd/system/red@.service`
Paste the following and replace all instances of :code:`username` with the username your bot is running under (hopefully not root):
.. code-block:: none
[Unit]
Description=%I redbot
After=multi-user.target
[Service]
ExecStart=/home/username/.local/bin/redbot %I --no-prompt
User=username
Group=username
Type=idle
Restart=always
RestartSec=15
RestartPreventExitStatus=0
TimeoutStopSec=10
[Install]
WantedBy=multi-user.target
Save and exit :code:`ctrl + O; enter; ctrl + x`
---------------------------------
Starting and enabling the service
---------------------------------
.. note:: This same file can be used to start as many instances of the bot as you wish, without creating more service files, just start and enable more services and add any bot instance name after the **@**
To start the bot, run the service and add the instance name after the **@**:
:code:`sudo systemctl start red@instancename`
To set the bot to start on boot, you must enable the service, again adding the instance name after the **@**:
:code:`sudo systemctl enable red@instancename`
If you need to shutdown the bot, you can use the ``[p]shutdown`` command or
type the following command in the terminal, still by adding the instance name after the **@**:
:code:`sudo systemctl stop red@instancename`
.. warning:: If the service doesn't stop in the next 10 seconds, the process is killed.
Check your logs to know the cause of the error that prevents the shutdown.
To view Reds log, you can acccess through journalctl:
:code:`sudo journalctl -u red@instancename`

232
docs/changelog_3_1_0.rst Normal file
View File

@@ -0,0 +1,232 @@
.. v3.1.0 Changelog
####################
v3.1.0 Release Notes
####################
----------------------
Mongo Driver Migration
----------------------
Due to the required changes of the Mongo driver for Config, all existing Mongo users will need to
complete the below instructions to continue to use Mongo after updating to 3.1.
This includes **all** users, regardless of any prior migration attempt to a development version of
3.1.
#. Upgrade to 3.1
#. Convert all existing Mongo instances to JSON using the new converters
#. Start each bot instance while using JSON and load any and all cogs you have in order to successfully preserve data.
#. Turn each instance off and convert back to Mongo.
**NOTE:** No data is wiped from your Mongo database when converting to JSON.
You may want to use a *new* database name when converting back to Mongo in order to not have duplicate data.
-------------
Setup Utility
-------------
New commands were introduced to simplify the conversion/editing/removal process both on our end and the users end.
Please use ``redbot-setup --help`` to learn how to use the new features.
.. HINT::
Converting to JSON: ``redbot-setup convert <instance_name> json``
Converting to Mongo: ``redbot-setup convert <instance_name> mongo``
################
v3.1.0 Changelog
################
-----
Audio
-----
* Add Spotify support (`#2328`_)
* Play local folders via text command (`#2457`_)
* Change pause to a toggle (`#2461`_)
* Remove aliases (`#2462`_)
* Add track length restriction (`#2465`_)
* Seek command can now seek to position (`#2470`_)
* Add option for dc at queue end (`#2472`_)
* Emptydisconnect and status refactor (`#2473`_)
* Queue clean and queue clear addition (`#2476`_)
* Fix for audioset status (`#2481`_)
* Playlist download addition (`#2482`_)
* Add songs when search-queuing (`#2513`_)
* Match v2 behavior for channel change (`#2521`_)
* Bot will no longer complain about permissions when trying to connect to user-limited channel, if it has "Move Members" permission (`#2525`_)
* Fix issue on audiostats command when more than 20 servers to display (`#2533`_)
* Fix for prev command display (`#2556`_)
* Fix for localtrack playing (`#2557`_)
* Fix for playlist queue when not playing (`#2586`_)
* Track search and append fixes (`#2591`_)
* DJ role should ask for a role (`#2606`_)
----
Core
----
* Warn on usage of ``yaml.load`` (`#2326`_)
* New Event dispatch: ``on_message_without_command`` (`#2338`_)
* Improve output format of cooldown messages (`#2412`_)
* Delete cooldown messages when expired (`#2469`_)
* Fix local blacklist/whitelist management (`#2531`_)
* ``[p]set locale`` now only accepts actual locales (`#2553`_)
* ``[p]listlocales`` now displays ``en-US`` (`#2553`_)
* ``redbot --version`` will now give you current version of Red (`#2567`_)
* Redesign help and related formatter (`#2628`_)
* Default locale changed from ``en`` to ``en-US`` (`#2642`_)
* New command ``[p]datapath`` that prints the bot's datapath (`#2652`_)
------
Config
------
* Updated Mongo driver to support large guilds (`#2536`_)
* Introduced ``init_custom`` method on Config objects (`#2545`_)
* We now record custom group primary key lengths in the core config object (`#2550`_)
* Migrated internal UUIDs to maintain cross platform consistency (`#2604`_)
-------------
DataConverter
-------------
* It's dead jim (Removal) (`#2554`_)
----------
discord.py
----------
* No longer vendoring discord.py (`#2587`_)
* Upgraded discord.py dependency to version 1.0.1 (`#2587`_)
----------
Downloader
----------
* ``[p]cog install`` will now tell user that cog has to be loaded (`#2523`_)
* The message when libraries fail to install is now formatted (`#2576`_)
* Fixed bug, that caused Downloader to include submodules on cog list (`#2590`_)
* ``[p]cog uninstall`` allows to uninstall multiple cogs now (`#2592`_)
* ``[p]cog uninstall`` will now remove cog from installed cogs even if it can't find the cog in install path anymore (`#2595`_)
* ``[p]cog install`` will not allow to install cogs which aren't suitable for installed version of Red anymore (`#2605`_)
* Cog Developers now have to use ``min_bot_version`` in form of version string instead of ``bot_version`` in info.json and they can also use ``max_bot_version`` to specify maximum version of Red, more in :doc:`framework_downloader`. (`#2605`_)
------
Filter
------
* Filter performs significantly better on large servers. (`#2509`_)
--------
Launcher
--------
* Fixed extras in the launcher (`#2588`_)
---
Mod
---
* Admins can now decide how many times message has to be repeated before ``deleterepeats`` removes it (`#2437`_)
* Fix: make ``[p]ban [days]`` optional as per the doc (`#2602`_)
* Added the command ``voicekick`` to kick members from a voice channel with optional mod case. (`#2639`_)
-----------
Permissions
-----------
* Removed: ``p`` alias for ``permissions`` command (`#2467`_)
-------------
Setup Scripts
-------------
* ``redbot-setup`` now uses the click CLI library (`#2579`_)
* ``redbot-setup convert`` now used to convert between libraries (`#2579`_)
* Backup support for Mongo is currently broken (`#2579`_)
-------
Streams
-------
* Add support for custom stream alert messages per guild (`#2600`_)
* Add ability to exclude rerun Twitch streams, and note rerun streams in embed status (`#2620`_)
-----
Tests
-----
* Test for ``trivia`` cog uses explicitly utf-8 encoding for checking yaml files (`#2565`_)
------
Trivia
------
* Fix of dead image link for Sao Tome and Principe in ``worldflags`` trivia (`#2540`_)
-----------------
Utility Functions
-----------------
* New: ``chat_formatting.humanize_timedelta`` (`#2412`_)
* ``Tunnel`` - Spelling correction of method name - changed ``files_from_attatch`` to ``files_from_attach`` (old name is left for backwards compatibility) (`#2496`_)
* ``Tunnel`` - fixed behavior of ``react_close()``, now when tunnel closes message will be sent to other end (`#2507`_)
* ``chat_formatting.humanize_list`` - Improved error handling of empty lists (`#2597`_)
.. _#2326: https://github.com/Cog-Creators/Red-DiscordBot/pull/2326
.. _#2328: https://github.com/Cog-Creators/Red-DiscordBot/pull/2328
.. _#2338: https://github.com/Cog-Creators/Red-DiscordBot/pull/2338
.. _#2412: https://github.com/Cog-Creators/Red-DiscordBot/pull/2412
.. _#2437: https://github.com/Cog-Creators/Red-DiscordBot/pull/2437
.. _#2457: https://github.com/Cog-Creators/Red-DiscordBot/pull/2457
.. _#2461: https://github.com/Cog-Creators/Red-DiscordBot/pull/2461
.. _#2462: https://github.com/Cog-Creators/Red-DiscordBot/pull/2462
.. _#2465: https://github.com/Cog-Creators/Red-DiscordBot/pull/2465
.. _#2467: https://github.com/Cog-Creators/Red-DiscordBot/pull/2467
.. _#2469: https://github.com/Cog-Creators/Red-DiscordBot/pull/2469
.. _#2470: https://github.com/Cog-Creators/Red-DiscordBot/pull/2470
.. _#2472: https://github.com/Cog-Creators/Red-DiscordBot/pull/2472
.. _#2473: https://github.com/Cog-Creators/Red-DiscordBot/pull/2473
.. _#2476: https://github.com/Cog-Creators/Red-DiscordBot/pull/2476
.. _#2481: https://github.com/Cog-Creators/Red-DiscordBot/pull/2481
.. _#2482: https://github.com/Cog-Creators/Red-DiscordBot/pull/2482
.. _#2496: https://github.com/Cog-Creators/Red-DiscordBot/pull/2496
.. _#2507: https://github.com/Cog-Creators/Red-DiscordBot/pull/2507
.. _#2509: https://github.com/Cog-Creators/Red-DiscordBot/pull/2509
.. _#2513: https://github.com/Cog-Creators/Red-DiscordBot/pull/2513
.. _#2521: https://github.com/Cog-Creators/Red-DiscordBot/pull/2521
.. _#2523: https://github.com/Cog-Creators/Red-DiscordBot/pull/2523
.. _#2525: https://github.com/Cog-Creators/Red-DiscordBot/pull/2525
.. _#2531: https://github.com/Cog-Creators/Red-DiscordBot/pull/2531
.. _#2533: https://github.com/Cog-Creators/Red-DiscordBot/pull/2533
.. _#2536: https://github.com/Cog-Creators/Red-DiscordBot/pull/2536
.. _#2540: https://github.com/Cog-Creators/Red-DiscordBot/pull/2540
.. _#2545: https://github.com/Cog-Creators/Red-DiscordBot/pull/2545
.. _#2550: https://github.com/Cog-Creators/Red-DiscordBot/pull/2550
.. _#2553: https://github.com/Cog-Creators/Red-DiscordBot/pull/2553
.. _#2554: https://github.com/Cog-Creators/Red-DiscordBot/pull/2554
.. _#2556: https://github.com/Cog-Creators/Red-DiscordBot/pull/2556
.. _#2557: https://github.com/Cog-Creators/Red-DiscordBot/pull/2557
.. _#2565: https://github.com/Cog-Creators/Red-DiscordBot/pull/2565
.. _#2567: https://github.com/Cog-Creators/Red-DiscordBot/pull/2567
.. _#2576: https://github.com/Cog-Creators/Red-DiscordBot/pull/2576
.. _#2579: https://github.com/Cog-Creators/Red-DiscordBot/pull/2579
.. _#2586: https://github.com/Cog-Creators/Red-DiscordBot/pull/2586
.. _#2587: https://github.com/Cog-Creators/Red-DiscordBot/pull/2587
.. _#2588: https://github.com/Cog-Creators/Red-DiscordBot/pull/2588
.. _#2590: https://github.com/Cog-Creators/Red-DiscordBot/pull/2590
.. _#2591: https://github.com/Cog-Creators/Red-DiscordBot/pull/2591
.. _#2592: https://github.com/Cog-Creators/Red-DiscordBot/pull/2592
.. _#2595: https://github.com/Cog-Creators/Red-DiscordBot/pull/2595
.. _#2597: https://github.com/Cog-Creators/Red-DiscordBot/pull/2597
.. _#2600: https://github.com/Cog-Creators/Red-DiscordBot/pull/2600
.. _#2602: https://github.com/Cog-Creators/Red-DiscordBot/pull/2602
.. _#2604: https://github.com/Cog-Creators/Red-DiscordBot/pull/2604
.. _#2605: https://github.com/Cog-Creators/Red-DiscordBot/pull/2605
.. _#2606: https://github.com/Cog-Creators/Red-DiscordBot/pull/2606
.. _#2620: https://github.com/Cog-Creators/Red-DiscordBot/pull/2620
.. _#2628: https://github.com/Cog-Creators/Red-DiscordBot/pull/2628
.. _#2639: https://github.com/Cog-Creators/Red-DiscordBot/pull/2639
.. _#2642: https://github.com/Cog-Creators/Red-DiscordBot/pull/2642
.. _#2652: https://github.com/Cog-Creators/Red-DiscordBot/pull/2652

109
docs/cog_customcom.rst Normal file
View File

@@ -0,0 +1,109 @@
.. CustomCommands Cog Reference
============================
CustomCommands Cog Reference
============================
------------
How it works
------------
CustomCommands allows you to create simple commands for your bot without requiring you to code your own cog for Red.
If the command you attempt to create shares a name with an already loaded command, you cannot overwrite it with this cog.
---------
Cooldowns
---------
You can set cooldowns for your custom commands. If a command is on cooldown, it will not be triggered.
You can set cooldowns per member or per channel, or set a cooldown guild-wide. You can also set multiple types of cooldown on a single custom command. All cooldowns must pass before the command will trigger.
------------------
Context Parameters
------------------
You can enhance your custom command's response by leaving spaces for the bot to substitute.
+-----------+----------------------------------------+
| Argument | Substitute |
+===========+========================================+
| {message} | The message the bot is responding to. |
+-----------+----------------------------------------+
| {author} | The user who called the command. |
+-----------+----------------------------------------+
| {channel} | The channel the command was called in. |
+-----------+----------------------------------------+
| {server} | The server the command was called in. |
+-----------+----------------------------------------+
| {guild} | Same as with {server}. |
+-----------+----------------------------------------+
You can further refine the response with dot notation. For example, {author.mention} will mention the user who called the command.
------------------
Command Parameters
------------------
You can further enhance your custom command's response by leaving spaces for the user to substitute.
To do this, simply put {#} in the response, replacing # with any number starting with 0. Each number will be replaced with what the user gave the command, in order.
You can refine the response with colon notation. For example, {0:Member} will accept members of the server, and {0:int} will accept a number. If no colon notation is provided, the argument will be returned unchanged.
+-----------------+--------------------------------+
| Argument | Substitute |
+=================+================================+
| {#:Member} | A member of your server. |
+-----------------+--------------------------------+
| {#:TextChannel} | A text channel in your server. |
+-----------------+--------------------------------+
| {#:Role} | A role in your server. |
+-----------------+--------------------------------+
| {#:int} | A whole number. |
+-----------------+--------------------------------+
| {#:float} | A decimal number. |
+-----------------+--------------------------------+
| {#:bool} | True or False. |
+-----------------+--------------------------------+
You can specify more than the above with colon notation, but those are the most common.
As with context parameters, you can use dot notation to further refine the response. For example, {0.mention:Member} will mention the Member specified.
----------------
Example commands
----------------
Showing your own avatar
.. code-block:: none
[p]customcom add simple avatar {author.avatar_url}
[p]avatar
https://cdn.discordapp.com/avatars/133801473317404673/be4c4a4fe47cb3e74c31a0504e7a295e.webp?size=1024
Repeating the user
.. code-block:: none
[p]customcom add simple say {0}
[p]say Pete and Repeat
Pete and Repeat
Greeting the specified member
.. code-block:: none
[p]customcom add simple greet Hello, {0.mention:Member}!
[p]greet Twentysix
Hello, @Twentysix!
Comparing two text channel's categories
.. code-block:: none
[p]customcom add simple comparecategory {0.category:TextChannel} | {1.category:TextChannel}
[p]comparecategory #support #general
Red | Community

97
docs/cog_permissions.rst Normal file
View File

@@ -0,0 +1,97 @@
.. Permissions Cog Reference
=========================
Permissions Cog Reference
=========================
------------
How it works
------------
When loaded, the permissions cog will allow you to define extra custom rules for who can use a
command.
If no applicable rules are found, the command will behave normally.
Rules can also be added to cogs, which will affect all commands from that cog. The cog name can be
found from the help menu.
-------------
Rule priority
-------------
Rules set for subcommands will take precedence over rules set for the parent commands, which
lastly take precedence over rules set for the cog. So for example, if a user is denied the Core
cog, but allowed the ``[p]set token`` command, the user will not be able to use any command in the
Core cog except for ``[p]set token``.
In terms of scope, global rules will be checked first, then server rules.
For each of those, the first rule pertaining to one of the following models will be used:
1. User
2. Voice channel
3. Text channel
4. Channel category
5. Roles, highest to lowest
6. Server (can only be in global rules)
7. Default rules
In private messages, only global rules about a user will be checked.
-------------------------
Setting Rules From a File
-------------------------
The permissions cog can also set, display or update rules with a YAML file with the
``[p]permissions yaml`` command. Models must be represented by ID. Rules must be ``true`` for
allow, or ``false`` for deny. Here is an example:
.. code-block:: yaml
COG:
Admin:
78631113035100160: true
96733288462286848: false
Audio:
133049272517001216: true
default: false
COMMAND:
cleanup bot:
78631113035100160: true
default: false
ping:
96733288462286848: false
default: true
----------------------
Example configurations
----------------------
Locking the ``[p]play`` command to approved server(s) as a bot owner:
.. code-block:: none
[p]permissions setdefaultglobalrule deny play
[p]permissions addglobalrule allow play [server ID or name]
Locking the ``[p]play`` command to specific voice channel(s) as a serverowner or admin:
.. code-block:: none
[p]permissions setdefaultserverrule deny play
[p]permissions setdefaultserverrule deny "playlist start"
[p]permissions addserverrule allow play [voice channel ID or name]
[p]permissions addserverrule allow "playlist start" [voice channel ID or name]
Allowing extra roles to use ``[p]cleanup``:
.. code-block:: none
[p]permissions addserverrule allow cleanup [role ID]
Preventing ``[p]cleanup`` from being used in channels where message history is important:
.. code-block:: none
[p]permissions addserverrule deny cleanup [channel ID or mention]

View File

@@ -19,9 +19,10 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
os.environ['BUILDING_DOCS'] = "1"
sys.path.insert(0, os.path.abspath(".."))
os.environ["BUILDING_DOCS"] = "1"
# -- General configuration ------------------------------------------------
@@ -34,38 +35,41 @@ os.environ['BUILDING_DOCS'] = "1"
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'sphinxcontrib.asyncio'
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
"sphinx.ext.doctest",
"sphinxcontrib_trio",
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"
# The master toctree document.
master_doc = 'index'
master_doc = "index"
# General information about the project.
project = 'Red - Discord Bot'
copyright = '2017, Cog Creators'
author = 'Cog Creators'
project = "Red - Discord Bot"
copyright = "2018, Cog Creators"
author = "Cog Creators"
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
from redbot.core import __version__
# The short X.Y version.
version = '3.0.0a1'
version = __version__
# The full version, including alpha/beta/rc tags.
release = '3.0.0a1'
release = __version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -77,10 +81,10 @@ language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
@@ -94,7 +98,10 @@ default_role = "any"
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"
# This will be needed until sphinx_rtd_theme supports the html5 writer
html4_writer = True
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -104,16 +111,16 @@ html_theme = 'sphinx_rtd_theme'
html_context = {
# Enable the "Edit in GitHub link within the header of each page.
'display_github': True,
'github_user': 'Cog-Creators',
'github_repo': 'Red-DiscordBot',
'github_version': 'V3/develop/docs/'
"display_github": True,
"github_user": "Cog-Creators",
"github_repo": "Red-DiscordBot",
"github_version": "V3/develop/docs/",
}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
@@ -121,12 +128,12 @@ html_static_path = ['_static']
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
html_sidebars = {
'**': [
'about.html',
'navigation.html',
'relations.html', # needs 'show_related': True theme option to display
'searchbox.html',
'donate.html',
"**": [
"about.html",
"navigation.html",
"relations.html", # needs 'show_related': True theme option to display
"searchbox.html",
"donate.html",
]
}
@@ -134,7 +141,7 @@ html_sidebars = {
# -- Options for HTMLHelp output ------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'Red-DiscordBotdoc'
htmlhelp_basename = "Red-DiscordBotdoc"
# -- Options for LaTeX output ---------------------------------------------
@@ -143,15 +150,12 @@ latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
@@ -161,8 +165,7 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'Red-DiscordBot.tex', 'Red - Discord Bot Documentation',
'Cog Creators', 'manual'),
(master_doc, "Red-DiscordBot.tex", "Red - Discord Bot Documentation", "Cog Creators", "manual")
]
@@ -170,10 +173,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'red-discordbot', 'Red - Discord Bot Documentation',
[author], 1)
]
man_pages = [(master_doc, "red-discordbot", "Red - Discord Bot Documentation", [author], 1)]
# -- Options for Texinfo output -------------------------------------------
@@ -182,15 +182,39 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'Red-DiscordBot', 'Red - Discord Bot Documentation',
author, 'Red-DiscordBot', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"Red-DiscordBot",
"Red - Discord Bot Documentation",
author,
"Red-DiscordBot",
"One line description of project.",
"Miscellaneous",
)
]
# -- Options for linkcheck builder ----------------------------------------
# A list of regular expressions that match URIs that should not be
# checked when doing a linkcheck build.
linkcheck_ignore = [r"https://java.com*", r"https://chocolatey.org*"]
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'python': ('https://docs.python.org/3.5', None),
'dpy': ('https://discordpy.readthedocs.io/en/rewrite/', None),
'motor': ('https://motor.readthedocs.io/en/stable/', None)}
# -- Options for extensions -----------------------------------------------
# Intersphinx
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"dpy": ("https://discordpy.readthedocs.io/en/v1.0.1/", None),
"motor": ("https://motor.readthedocs.io/en/stable/", None),
}
# Doctest
# If this string is non-empty, all blocks with ``>>>`` in them will be
# tested, not just the ones explicitly marked with ``.. doctest::``
doctest_test_doctest_blocks = ""
# Autodoc options
autodoc_default_flags = ["show-inheritance"]
autodoc_typehints = "none"

View File

@@ -0,0 +1,48 @@
.. V3 Shared API Key Reference
===============
Shared API Keys
===============
Red has a central API key storage utilising the core bots config. This allows cog creators to add a single location to store API keys for their cogs which may be shared between other cogs.
There needs to be some consistency between cog creators when using shared API keys between cogs. To help make this easier service should be all **lowercase** and the key names should match the naming convetion of the API being accessed.
Example:
Twitch has a client ID and client secret so a user should be asked to input
``[p]set api twitch client_id,1234ksdjf client_secret,1234aldlfkd``
and when accessed in the code it should be done by
.. code-block:: python
await self.bot.db.api_tokens.get_raw("twitch", default={"client_id": None, "client_secret": None})
Each service has its own dict of key, value pairs for each required key type. If there's only one key required then a name for the key is still required for storing and accessing.
Example:
``[p]set api youtube api_key,1234ksdjf``
and when accessed in the code it should be done by
.. code-block:: python
await self.bot.db.api_tokens.get_raw("youtube", default={"api_key": None})
***********
Basic Usage
***********
.. code-block:: python
class MyCog:
@commands.command()
async def youtube(self, ctx, user: str):
apikey = await self.bot.db.api_tokens.get_raw("youtube", default={"api_key": None})
if apikey["api_key"] is None:
return await ctx.send("The YouTube API key has not been set.")
# Use the API key to access content as you normally would

View File

@@ -16,15 +16,16 @@ Basic Usage
.. code-block:: python
from redbot.core import bank
from redbot.core import bank, commands
import discord
class MyCog:
class MyCog(commands.Cog):
@commands.command()
async def balance(self, ctx, user: discord.Member=None):
async def balance(self, ctx, user: discord.Member = None):
if user is None:
user = ctx.author
bal = bank.get_balance(user)
currency = bank.get_currency_name(ctx.guild)
bal = await bank.get_balance(user)
currency = await bank.get_currency_name(ctx.guild)
await ctx.send(
"{}'s balance is {} {}".format(
user.display_name, bal, currency
@@ -40,3 +41,7 @@ Bank
.. automodule:: redbot.core.bank
:members:
:exclude-members: cost
.. autofunction:: cost
:decorator:

23
docs/framework_bot.rst Normal file
View File

@@ -0,0 +1,23 @@
.. bot module docs
===
Bot
===
.. automodule:: redbot.core.bot
RedBase
^^^^^^^
.. autoclass:: RedBase
:members:
:exclude-members: get_context
.. automethod:: register_rpc_handler
.. automethod:: unregister_rpc_handler
Red
^^^
.. autoclass:: Red
:members:

11
docs/framework_checks.rst Normal file
View File

@@ -0,0 +1,11 @@
.. _checks:
========================
Command Check Decorators
========================
The following are all decorators for commands, which add restrictions to where and when they can be
run.
.. automodule:: redbot.core.checks
:members:

View File

@@ -0,0 +1,26 @@
.. red commands module documentation
================
Commands Package
================
This package acts almost identically to :doc:`discord.ext.commands <dpy:ext/commands/api>`; i.e.
all of the attributes from discord.py's are also in ours.
Some of these attributes, however, have been slightly modified, while others have been added to
extend functionlities used throughout the bot, as outlined below.
.. autofunction:: redbot.core.commands.command
.. autofunction:: redbot.core.commands.group
.. autoclass:: redbot.core.commands.Command
:members:
.. autoclass:: redbot.core.commands.Group
:members:
.. autoclass:: redbot.core.commands.Context
:members:
.. automodule:: redbot.core.commands.requires
:members: PrivilegeLevel, PermState, Requires

View File

@@ -29,7 +29,7 @@ Basic Usage
@commands.command()
async def return_some_data(self, ctx):
await ctx.send(await config.foo())
await ctx.send(await self.config.foo())
********
Tutorial
@@ -175,6 +175,195 @@ example, :py:meth:`Config.clear_all_guilds` resets all guild data. For member
data, you can clear on both a per-guild and guild-independent basis, see
:py:meth:`Config.clear_all_members` for more info.
**************
Advanced Usage
**************
Config makes it extremely easy to organize data that can easily fit into one of the standard categories (global,
guild, user etc.) but there may come a time when your data does not work with the existing categories. There are now
features within Config to enable developers to work with data how they wish.
This usage guide will cover the following features:
- :py:meth:`Group.get_raw`
- :py:meth:`Group.set_raw`
- :py:meth:`Group.clear_raw`
For this example let's suppose that we're creating a cog that allows users to buy and own multiple pets using
the built-in Economy credits::
from redbot.core import bank
from redbot.core import Config
from discord.ext import commands
class Pets:
def __init__(self):
self.conf = Config.get_conf(self, 1234567890)
# Here we'll assign some default costs for the pets
self.conf.register_global(
dog=100,
cat=100,
bird=50
)
self.conf.register_user(
pets={}
)
And now that the cog is set up we'll need to create some commands that allow users to purchase these pets::
# continued
@commands.command()
async def get_pet(self, ctx, pet_type: str, pet_name: str):
"""
Purchase a pet.
Pet type must be one of: dog, cat, bird
"""
# Now we need to determine what the cost of the pet is and
# if the user has enough credits to purchase it.
# We will need to use "get_raw"
try:
cost = await self.conf.get_raw(pet_type)
except KeyError:
# KeyError is thrown whenever the data you try to access does not
# exist in the registered defaults or in the saved data.
await ctx.send("Bad pet type, try again.")
return
After we've determined the cost of the pet we need to check if the user has enough credits and then we'll need to
assign a new pet to the user. This is very easily done using the V3 bank API and :py:meth:`Group.set_raw`::
# continued
if await bank.can_spend(ctx.author, cost):
await self.conf.user(ctx.author).pets.set_raw(
pet_name, value={'cost': cost, 'hunger': 0}
)
# this is equivalent to doing the following
pets = await self.conf.user(ctx.author).pets()
pets[pet_name] = {'cost': cost, 'hunger': 0}
await self.conf.user(ctx.author).pets.set(pets)
Since the pets can get hungry we're gonna need a command that let's pet owners check how hungry their pets are::
# continued
@commands.command()
async def hunger(self, ctx, pet_name: str):
try:
hunger = await self.conf.user(ctx.author).pets.get_raw(pet_name, 'hunger')
except KeyError:
# Remember, this is thrown if something in the provided identifiers
# is not found in the saved data or the defaults.
await ctx.send("You don't own that pet!")
return
await ctx.send("Your pet has {}/100 hunger".format(hunger))
We're responsible pet owners here, so we've also got to have a way to feed our pets::
# continued
@commands.command()
async def feed(self, ctx, pet_name: str, food: int):
# This is a bit more complicated because we need to check if the pet is
# owned first.
try:
pet = await self.conf.user(ctx.author).pets.get_raw(pet_name)
except KeyError:
# If the given pet name doesn't exist in our data
await ctx.send("You don't own that pet!")
return
hunger = pet.get("hunger")
# Determine the new hunger and make sure it doesn't go negative
new_hunger = max(hunger - food, 0)
await self.conf.user(ctx.author).pets.set_raw(
pet_name, 'hunger', value=new_hunger
)
# We could accomplish the same thing a slightly different way
await self.conf.user(ctx.author).pets.get_attr(pet_name).hunger.set(new_hunger)
await ctx.send("Your pet is now at {}/100 hunger!".format(new_hunger)
Of course, if we're less than responsible pet owners, there are consequences::
#continued
@commands.command()
async def adopt(self, ctx, pet_name: str, *, member: discord.Member):
try:
pet = await self.conf.user(member).pets.get_raw(pet_name)
except KeyError:
await ctx.send("That person doesn't own that pet!")
return
hunger = pet.get("hunger")
if hunger < 80:
await ctx.send("That pet is too well taken care of to be adopted.")
return
await self.conf.user(member).pets.clear_raw(pet_name)
# this is equivalent to doing the following
pets = await self.conf.user(member).pets()
del pets[pet_name]
await self.conf.user(member).pets.set(pets)
await self.conf.user(ctx.author).pets.set_raw(pet_name, value=pet)
await ctx.send(
"Your request to adopt this pet has been granted due to "
"how poorly it was taken care of."
)
*************
V2 Data Usage
*************
There has been much conversation on how to bring V2 data into V3 and, officially, we recommend that cog developers
make use of the public interface in Config (using the categories as described in these docs) rather than simply
copying and pasting your V2 data into V3. Using Config as recommended will result in a much better experience for
you in the long run and will simplify cog creation and maintenance.
However.
We realize that many of our cog creators have expressed disinterest in writing converters for V2 to V3 style data.
As a result we have opened up config to take standard V2 data and allow cog developers to manipulate it in V3 in
much the same way they would in V2. The following examples will demonstrate how to accomplish this.
.. warning::
By following this method to use V2 data in V3 you may be at risk of data corruption if your cog is used on a bot
with multiple shards. USE AT YOUR OWN RISK.
.. code-block:: python
from redbot.core import Config
class ExampleCog:
def __init__(self):
self.conf = Config.get_conf(self, 1234567890)
self.data = {}
async def load_data(self):
self.data = await self.conf.custom("V2", "V2").all()
async def save_data(self):
await self.conf.custom("V2", "V2").set(self.data)
async def setup(bot):
cog = ExampleCog()
await cog.load_data()
bot.add_cog(cog)
*************
API Reference
*************
@@ -185,6 +374,21 @@ API Reference
inside the bot itself! Simply take a peek inside of the :code:`tests/core/test_config.py` file for examples of using
Config in all kinds of ways.
.. important::
When getting, setting or clearing values in Config, all keys are casted to `str` for you. This
includes keys within a `dict` when one is being set, as well as keys in nested dictionaries
within that `dict`. For example::
>>> conf = Config.get_conf(self, identifier=999)
>>> conf.register_global(foo={})
>>> await conf.foo.set_raw(123, value=True)
>>> await conf.foo()
{'123': True}
>>> await conf.foo.set({123: True, 456: {789: False}}
>>> await conf.foo()
{'123': True, '456': {'789': False}}
.. automodule:: redbot.core.config
Config

View File

@@ -1,10 +0,0 @@
.. red invocation context documentation
==========================
Command Invocation Context
==========================
.. automodule:: redbot.core.context
.. autoclass:: redbot.core.RedContext
:members:

View File

@@ -6,21 +6,38 @@ Downloader Framework
Info.json
*********
The info.json file may exist inside every package folder in the repo,
it is optional however. This string describes the valid keys within
an info file (and maybe how the Downloader cog uses them).
The optional info.json file may exist inside every package folder in the repo,
as well as in the root of the repo. The following sections describe the valid
keys within an info file (and maybe how the Downloader cog uses them).
KEYS (case sensitive):
Keys common to both repo and cog info.json (case sensitive)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ``author`` (list of strings) - list of names of authors of the cog
- ``author`` (list of strings) - list of names of authors of the cog or repo.
- ``bot_version`` (list of integer) - Min version number of Red in the format ``(MAJOR, MINOR, PATCH)``
- ``description`` (string) - A long description of the cog or repo. For cogs, this
is displayed when a user executes ``!cog info``.
- ``description`` (string) - A long description of the cog that appears when a user executes ```!cog info``.
- ``install_msg`` (string) - The message that gets displayed when a cog
is installed or a repo is added
.. tip:: You can use the ``[p]`` key in your string to use the prefix
used for installing.
- ``hidden`` (bool) - Determines if a cog is available for install.
- ``short`` (string) - A short description of the cog or repo. For cogs, this info
is displayed when a user executes ``!cog list``
- ``install_msg`` (string) - The message that gets displayed when a cog is installed
Keys specific to the cog info.json (case sensitive)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ``min_bot_version`` (string) - Min version number of Red in the format ``MAJOR.MINOR.MICRO``
- ``max_bot_version`` (string) - Max version number of Red in the format ``MAJOR.MINOR.MICRO``,
if ``min_bot_version`` is newer than ``max_bot_version``, ``max_bot_version`` will be ignored
- ``hidden`` (bool) - Determines if a cog is visible in the cog list for a repo.
- ``disabled`` (bool) - Determines if a cog is available for install.
- ``required_cogs`` (map of cogname to repo URL) - A map of required cogs that this cog depends on.
Downloader will not deal with this functionality but it may be useful for other cogs.
@@ -29,9 +46,6 @@ KEYS (case sensitive):
passed to pip on cog install. ``SHARED_LIBRARIES`` do NOT go in this
list.
- ``short`` (string) - A short description of the cog that appears when
a user executes `!cog list`
- ``tags`` (list of strings) - A list of strings that are related to the
functionality of the cog. Used to aid in searching.

View File

@@ -13,11 +13,12 @@ Basic Usage
.. code-block:: python
from discord.ext import commands
from redbot.core.i18n import CogI18n
from redbot.core import commands
from redbot.core.i18n import Translator, cog_i18n
_ = CogI18n("ExampleCog", __file__)
_ = Translator("ExampleCog", __file__)
@cog_i18n(_)
class ExampleCog:
"""description"""
@@ -39,16 +40,19 @@ In a command prompt in your cog's package (where yourcog.py is),
create a directory called "locales".
Then do one of the following:
Windows: :code:`python <your python install path>\Tools\i18n\pygettext.py -n -p locales`
Windows: :code:`python <your python install path>\Tools\i18n\pygettext.py -D -n -p locales`
Mac: ?
Linux: :code:`pygettext3 -n -p locales`
Linux: :code:`pygettext3 -D -n -p locales`
This will generate a messages.pot file with strings to be translated
This will generate a messages.pot file with strings to be translated, including
docstrings.
-------------
API Reference
-------------
.. automodule:: redbot.core.i18n
.. automodule:: redbot.core.i18n
:members:
:special-members: __call__

View File

@@ -16,17 +16,17 @@ Basic Usage
.. code-block:: python
from redbot.core import modlog
from redbot.core import commands, modlog
import discord
class MyCog:
class MyCog(commands.Cog):
@commands.command()
@checks.admin_or_permissions(ban_members=True)
async def ban(self, ctx, user: discord.Member, reason: str=None):
async def ban(self, ctx, user: discord.Member, reason: str = None):
await ctx.guild.ban(user)
case = modlog.create_case(
ctx.guild, ctx.message.created_at, "ban", user,
ctx.author, reason, until=None, channel=None
case = await modlog.create_case(
ctx.bot, ctx.guild, ctx.message.created_at, action="ban",
user=user, moderator=ctx.author, reason=reason
)
await ctx.send("Done. It was about time.")
@@ -35,50 +35,65 @@ Basic Usage
Registering Case types
**********************
To register a single case type:
To register case types, use an asynchronous ``initialize()`` method and call
it from your setup function:
.. code-block:: python
from redbot.core import modlog
# mycog/mycog.py
from redbot.core import modlog, commands
import discord
class MyCog:
def __init__(self, bot):
class MyCog(commands.Cog):
async def initialize(self):
await self.register_casetypes()
@staticmethod
async def register_casetypes():
# Registering a single casetype
ban_case = {
"name": "ban",
"default_setting": True,
"image": ":hammer:",
"image": "\N{HAMMER}",
"case_str": "Ban",
"audit_type": "ban"
# audit_type should be omitted if the action doesn't show
# up in the audit log.
"audit_type": "ban",
}
modlog.register_casetype(**ban_case)
try:
await modlog.register_casetype(**ban_case)
except RuntimeError:
pass
To register multiple case types:
.. code-block:: python
from redbot.core import modlog
import discord
class MyCog:
def __init__(self, bot):
# Registering multiple casetypes
new_types = [
{
"name": "ban",
"name": "hackban",
"default_setting": True,
"image": ":hammer:",
"case_str": "Ban",
"audit_type": "ban"
"image": "\N{BUST IN SILHOUETTE}\N{HAMMER}",
"case_str": "Hackban",
"audit_type": "ban",
},
{
"name": "kick",
"default_setting": True,
"image": ":boot:",
"image": "\N{WOMANS BOOTS}",
"case_str": "Kick",
"audit_type": "kick"
}
]
modlog.register_casetypes(new_types)
await modlog.register_casetypes(new_types)
.. code-block:: python
# mycog/__init__.py
from .mycog import MyCog
async def setup(bot):
cog = MyCog()
await cog.initialize()
bot.add_cog(cog)
.. important::
Image should be the emoji you want to represent your case type with.

63
docs/framework_rpc.rst Normal file
View File

@@ -0,0 +1,63 @@
.. rpc docs
===
RPC
===
V3 comes default with an internal RPC server that may be used to remotely control the bot in various ways.
Cogs must register functions to be exposed to RPC clients.
Each of those functions must only take JSON serializable parameters and must return JSON serializable objects.
To enable the internal RPC server you must start the bot with the ``--rpc`` flag.
********
Examples
********
.. code-block:: Python
def setup(bot):
c = Cog()
bot.add_cog(c)
bot.register_rpc_handler(c.rpc_method)
*******************************
Interacting with the RPC Server
*******************************
The RPC server opens a websocket bound to port ``6133`` on ``127.0.0.1``.
This is not configurable for security reasons as broad access to this server gives anyone complete control over your bot.
To access the server you must find a library that implements websocket based JSONRPC in the language of your choice.
There are a few built-in RPC methods to note:
* ``GET_METHODS`` - Returns a list of available RPC methods.
* ``GET_METHOD_INFO`` - Will return the docstring for an available RPC method. Useful for finding information about the method's parameters and return values.
* ``GET_TOPIC`` - Returns a list of available RPC message topics.
* ``GET_SUBSCRIPTIONS`` - Returns a list of RPC subscriptions.
* ``SUBSCRIBE`` - Subscribes to an available RPC message topic.
* ``UNSUBSCRIBE`` - Unsubscribes from an RPC message topic.
All RPC methods accept a list of parameters.
The built-in methods above expect their parameters to be in list format.
All cog-based methods expect their parameter list to take one argument, a JSON object, in the following format::
params = [
{
"args": [], # A list of positional arguments
"kwargs": {}, # A dictionary of keyword arguments
}
]
# As an example, here's a call to "get_method_info"
rpc_call("GET_METHOD_INFO", ["get_methods",])
# And here's a call to "core__load"
rpc_call("CORE__LOAD", {"args": [["general", "economy", "downloader"],], "kwargs": {}})
*************
API Reference
*************
Please see the :class:`redbot.core.bot.RedBase` class for details on the RPC handler register and unregister methods.

View File

@@ -4,14 +4,50 @@
Utility Functions
=================
General Utility
===============
.. automodule:: redbot.core.utils
:members: deduplicate_iterables, bounded_gather, bounded_gather_iter
Chat Formatting
===============
.. automodule:: redbot.core.utils.chat_formatting
:members:
Embed Helpers
=============
.. automodule:: redbot.core.utils.embed
:members:
Reaction Menus
==============
.. automodule:: redbot.core.utils.menus
:members:
Event Predicates
================
.. automodule:: redbot.core.utils.predicates
:members:
Mod Helpers
===========
.. automodule:: redbot.core.utils.mod
:members:
Tunnel
======
.. automodule:: redbot.core.utils.tunnel
:members: Tunnel
Common Filters
==============
.. automodule:: redbot.core.utils.common_filters
:members:

View File

@@ -17,11 +17,10 @@ you in the process.
Getting started
---------------
To start off, be sure that you have installed Python 3.5 or higher (if you
are on Windows, stick with 3.5). Open a terminal or command prompt and type
:code:`pip install --process-dependency-links -U git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=redbot[test]`
To start off, be sure that you have installed Python 3.7.
Open a terminal or command prompt and type :code:`pip install -U git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=redbot[test]`
(note that if you get an error with this, try again but put :code:`python -m` in front of the command
This will install the latest version of V3.
This will install the latest version of V3.
--------------------
Setting up a package
@@ -45,9 +44,9 @@ In that file, place the following code:
.. code-block:: python
from discord.ext import commands
from redbot.core import commands
class Mycog:
class Mycog(commands.Cog):
"""My custom cog"""
@commands.command()
@@ -90,6 +89,6 @@ have successfully created a cog!
Additional resources
--------------------
Be sure to check out the `migration guide </guide_migration>`_ for some resources
Be sure to check out the :doc:`/guide_migration` for some resources
on developing cogs for V3. This will also cover differences between V2 and V3 for
those who developed cogs for V2.

View File

@@ -7,7 +7,7 @@
Migrating Cogs to V3
====================
First, be sure to read `discord.py's migration guide <http://discordpy.readthedocs.io/en/rewrite/migrating.html>`_
First, be sure to read `discord.py's migration guide <https://discordpy.readthedocs.io/en/v1.0.1/migrating.html>`_
as that covers all of the changes to discord.py that will affect the migration process
----------------

View File

@@ -11,17 +11,17 @@ Welcome to Red - Discord Bot's documentation!
:caption: Installation Guides:
install_windows
install_mac
install_ubuntu
install_debian
install_centos
install_raspbian
install_linux_mac
venv_guide
autostart_systemd
.. toctree::
:maxdepth: 2
:caption: Cog Reference:
cog_customcom
cog_downloader
cog_permissions
.. toctree::
:maxdepth: 2
@@ -29,16 +29,26 @@ Welcome to Red - Discord Bot's documentation!
guide_migration
guide_cog_creation
framework_apikeys
framework_bank
framework_bot
framework_checks
framework_cogmanager
framework_datamanager
framework_commands
framework_config
framework_datamanager
framework_downloader
framework_events
framework_i18n
framework_modlog
framework_context
framework_rpc
framework_utils
.. toctree::
:maxdepth: 2
:caption: Changelogs:
changelog_3_1_0
Indices and tables

View File

@@ -1,54 +0,0 @@
.. centos install guide
==========================
Installing Red on CentOS 7
==========================
---------------------------
Installing pre-requirements
---------------------------
.. code-block:: none
yum -y groupinstall development
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
yum -y install yum-utils wget which python35u python35u-pip python35u-devel openssl-devel libffi-devel git opus-devel
sh -c "$(wget https://gist.githubusercontent.com/mustafaturan/7053900/raw/27f4c8bad3ee2bb0027a1a52dc8501bf1e53b270/latest-ffmpeg-centos6.sh -O -)"
--------------
Installing Red
--------------
Without audio:
:code:`pip3 install -U --process-dependency-links red-discordbot`
With audio:
:code:`pip3 install -U --process-dependency-links red-discordbot[voice]`
To install the development version (without audio):
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot`
To install the development version (with audio):
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot[voice]`
----------------------
Setting up an instance
----------------------
Run :code:`redbot-setup` and follow the prompts. It will ask first for where you want to
store the data (the default is :code:`~/.local/share/Red-DiscordBot`) and will then ask
for confirmation of that selection. Next, it will ask you to choose your storage backend
(the default here is JSON). It will then ask for a name for your instance. This can be
anything as long as it does not contain spaces; however, keep in mind that this is the
name you will use to run your bot, and so it should be something you can remember.
-----------
Running Red
-----------
Run :code:`redbot <your instance name>` and run through the initial setup. This will ask for
your token and a prefix.

View File

@@ -1,55 +0,0 @@
.. debian install guide
================================
Installing Red on Debian Stretch
================================
.. warning:: For safety reasons, DO NOT install Red with a root user. Instead, make a new one.
---------------------------
Installing pre-requirements
---------------------------
.. code-block:: none
echo "deb http://httpredir.debian.org/debian stretch-backports main contrib non-free" >> /etc/apt/sources.list
apt-get update
apt-get install python3.5-dev python3-pip build-essential libssl-dev libffi-dev git ffmpeg libopus-dev unzip -y
------------------
Installing the bot
------------------
To install without audio:
:code:`pip3 install -U --process-dependency-links red-discordbot`
To install with audio:
:code:`pip3 install -U --process-dependency-links red-discordbot[voice]`
To install the development version (without audio):
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot`
To install the development version (with audio):
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot[voice]`
------------------------
Setting up your instance
------------------------
Run :code:`redbot-setup` and follow the prompts. It will ask first for where you want to
store the data (the default is :code:`~/.local/share/Red-DiscordBot`) and will then ask
for confirmation of that selection. Next, it will ask you to choose your storage backend
(the default here is JSON). It will then ask for a name for your instance. This can be
anything as long as it does not contain spaces; however, keep in mind that this is the
name you will use to run your bot, and so it should be something you can remember.
-----------
Running Red
-----------
Run :code:`redbot <your instance name>` and run through the initial setup. This will ask for
your token and a prefix.

244
docs/install_linux_mac.rst Normal file
View File

@@ -0,0 +1,244 @@
.. _linux-mac-install-guide:
==============================
Installing Red on Linux or Mac
==============================
.. warning::
For safety reasons, DO NOT install Red with a root user. If you are unsure how to create
a new user, see the man page for the ``useradd`` command.
-------------------------------
Installing the pre-requirements
-------------------------------
Please install the pre-requirements using the commands listed for your operating system.
The pre-requirements are:
- Python 3.7.0 or greater
- pip 9.0 or greater
- git
- Java Runtime Environment 8 or later (for audio support)
.. _install-arch:
~~~~~~~~~~
Arch Linux
~~~~~~~~~~
.. code-block:: none
sudo pacman -Syu python-pip git base-devel jre8-openjdk
.. _install-centos:
.. _install-fedora:
.. _install-rhel:
~~~~~~~~~~~~~~~~~~~~~~~~~~
CentOS 7, Fedora, and RHEL
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: none
yum -y groupinstall development
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
sudo yum install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel \
openssl-devel xz xz-devel libffi-devel git2u java-1.8.0-openjdk
Complete the rest of the installation by `installing Python 3.7 with pyenv <install-python-pyenv>`.
.. _install-debian:
.. _install-raspbian:
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Debian and Raspbian Stretch
~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. warning::
Audio will not work on Raspberry Pi's **below** 2B. This is a CPU problem and
*cannot* be fixed.
We recommend installing pyenv as a method of installing non-native versions of python on
Debian/Raspbian Stretch. This guide will tell you how. First, run the following commands:
.. code-block:: none
sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git unzip default-jre
Complete the rest of the installation by `installing Python 3.7 with pyenv <install-python-pyenv>`.
.. _install-mac:
~~~
Mac
~~~
Install Brew: in Finder or Spotlight, search for and open *Terminal*. In the terminal, paste the
following, then press Enter:
.. code-block:: none
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
After the installation, install the required packages by pasting the commands and pressing enter,
one-by-one:
.. code-block:: none
brew install python --with-brewed-openssl
brew install git
brew tap caskroom/versions
brew cask install homebrew/cask-versions/adoptopenjdk8
It's possible you will have network issues. If so, go in your Applications folder, inside it, go in the Python 3.7 folder then double click ``Install certificates.command``
.. _install-ubuntu:
.. _install-ubuntu-bionic:
.. _install-ubuntu-cosmic:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ubuntu 18.04 Bionic Beaver and 18.10 Cosmic Cuttlefish
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: none
sudo apt install python3.7 python3.7-dev python3.7-venv python3-pip build-essential \
libssl-dev libffi-dev git unzip default-jre -y
.. _install-ubuntu-xenial:
~~~~~~~~~~~~~~~~~~~~~~~~~
Ubuntu 16.04 Xenial Xerus
~~~~~~~~~~~~~~~~~~~~~~~~~
We recommend adding the ``deadsnakes`` apt repository to install Python 3.7 or greater:
.. code-block:: none
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
Now, install python, pip, git and java with the following commands:
.. code-block:: none
sudo apt install python3.7 python3.7-dev build-essential libssl-dev libffi-dev git \
unzip default-jre curl -y
curl https://bootstrap.pypa.io/get-pip.py | sudo python3.7
.. _install-python-pyenv:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Installing Python with pyenv
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On distributions where Python 3.7 needs to be compiled from source, we recommend the use of pyenv.
This simplifies the compilation process and has the added bonus of simplifying setting up Red in a
virtual environment.
.. code-block:: none
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
After this command, you may see a warning about 'pyenv' not being in the load path. Follow the
instructions given to fix that, then close and reopen your shell.
Then run the following command:
.. code-block:: none
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.7.2 -v
This may take a long time to complete, depending on your hardware. For some machines (such as
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
the ``CONFIGURE_OPTS=--enable-optimizations`` part from the front of the command, which will
drastically reduce the install time. However, be aware that this will make Python run about 10%
slower.
After that is finished, run:
.. code-block:: none
pyenv global 3.7.2
Pyenv is now installed and your system should be configured to run Python 3.7.
------------------------------
Creating a Virtual Environment
------------------------------
We **strongly** recommend installing Red into a virtual environment. See the section
`installing-in-virtual-environment`.
.. _installing-red-linux-mac:
--------------
Installing Red
--------------
Choose one of the following commands to install Red.
.. note::
If you're not inside an activated virtual environment, include the ``--user`` flag with all
``python3.7 -m pip`` commands.
To install without MongoDB support:
.. code-block:: none
python3.7 -m pip install -U Red-DiscordBot
Or, to install with MongoDB support:
.. code-block:: none
python3.7 -m pip install -U Red-DiscordBot[mongo]
.. note::
To install the development version, replace ``Red-DiscordBot`` in the above commands with the
following link:
.. code-block:: none
git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=Red-DiscordBot
--------------------------
Setting Up and Running Red
--------------------------
After installation, set up your instance with the following command:
.. code-block:: none
redbot-setup
This will set the location where data will be stored, as well as your
storage backend and the name of the instance (which will be used for
running the bot).
Once done setting up the instance, run the following command to run Red:
.. code-block:: none
redbot <your instance name>
It will walk through the initial setup, asking for your token and a prefix.
You can find out how to obtain a token with
`this guide <https://discordpy.readthedocs.io/en/v1.0.1/discord.html#creating-a-bot-account>`_,
section "Creating a Bot Account".
You may also run Red via the launcher, which allows you to restart the bot
from discord, and enable auto-restart. You may also update the bot from the
launcher menu. Use the following command to run the launcher:
.. code-block:: none
redbot-launcher

View File

@@ -1,53 +0,0 @@
.. mac install guide
=====================
Installing Red on Mac
=====================
---------------------------
Installing pre-requirements
---------------------------
* Install Brew
* In Finder or Spotlight, search for and open terminal. In the window that will open, paste this:
:code:`/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`
and press enter.
* After the installation, install the required packages by pasting the commands and pressing enter, one-by-one:
* :code:`brew install python3 --with-brewed-openssl`
* :code:`brew install git`
* :code:`brew install ffmpeg --with-ffplay`
* :code:`brew install opus`
--------------
Installing Red
--------------
Without audio:
:code:`pip3 install -U --process-dependency-links red-discordbot`
With audio:
:code:`pip3 install -U --process-dependency-links red-discordbot[voice]`
To install the development version (without audio):
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot`
To install the development version (with audio):
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot[voice]`
----------------------
Setting up an instance
----------------------
To set up an instance, run :code:`redbot-setup` and follow the steps there, providing the requested information
or accepting the defaults. Keep in mind that the instance name will be the one you use when running the bot, so
make it something you can remember
-----------
Running Red
-----------
Run :code:`redbot <your instance name>` and go through the initial setup (it will ask for the token and a prefix).

View File

@@ -1,53 +0,0 @@
.. raspbian install guide
==================================
Installing Red on Raspbian Stretch
==================================
---------------------------
Installing pre-requirements
---------------------------
.. code-block:: none
sudo apt-get install python3.5-dev python3-pip build-essential libssl-dev libffi-dev git libav-tools libopus-dev unzip -y
--------------
Installing Red
--------------
Without audio:
:code:`pip3 install -U --process-dependency-links red-discordbot`
With audio:
:code:`pip3 install -U --process-dependency-links red-discordbot[voice]`
To install the development version (without audio):
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot`
To install the development version (with audio):
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot[voice]`
----------------------
Setting up an instance
----------------------
Run :code:`redbot-setup` and follow the prompts. It will ask first for where you want to
store the data (the default is :code:`~/.local/share/Red-DiscordBot`) and will then ask
for confirmation of that selection. Next, it will ask you to choose your storage backend
(the default here is JSON). It will then ask for a name for your instance. This can be
anything as long as it does not contain spaces; however, keep in mind that this is the
name you will use to run your bot, and so it should be something you can remember.
-----------
Running Red
-----------
Run :code:`redbot <your instance name>` and run through the initial setup. This will ask for
your token and a prefix.
.. warning:: Audio will not work on Raspberry Pi's **below** 2B. This is a CPU problem and *cannot* be fixed.

View File

@@ -1,53 +0,0 @@
.. ubuntu install guide
==============================
Installing Red on Ubuntu 16.04
==============================
.. warning:: For safety reasons, DO NOT install Red with a root user. Instead, make a new one.
-------------------------------
Installing the pre-requirements
-------------------------------
.. code-block:: none
sudo apt install python3.5-dev python3-pip build-essential libssl-dev libffi-dev git ffmpeg libopus-dev unzip -y
------------------
Installing the bot
------------------
To install without audio:
:code:`pip3 install -U --process-dependency-links red-discordbot`
To install with audio:
:code:`pip3 install -U --process-dependency-links red-discordbot[voice]`
To install the development version (without audio):
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot`
To install the development version (with audio):
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot[voice]`
------------------------
Setting up your instance
------------------------
Run :code:`redbot-setup` and follow the prompts. It will ask first for where you want to
store the data (the default is :code:`~/.local/share/Red-DiscordBot`) and will then ask
for confirmation of that selection. Next, it will ask you to choose your storage backend
(the default here is JSON). It will then ask for a name for your instance. This can be
anything as long as it does not contain spaces; however, keep in mind that this is the
name you will use to run your bot, and so it should be something you can remember.
-----------
Running Red
-----------
Run :code:`redbot <your instance name>` and run through the initial setup. This will ask for
your token and a prefix.

View File

@@ -1,4 +1,4 @@
.. windows installation docs
.. _windows-install-guide:
=========================
Installing Red on Windows
@@ -8,36 +8,113 @@ Installing Red on Windows
Needed Software
---------------
* `Python <https://python.org/downloads/>`_ - Red needs at least Python 3.5
The following software dependencies can all be installed quickly and easily through powershell,
using a trusted package manager for windows called `Chocolatey <https://chocolatey.org>`_
.. attention:: Please note that 3.6 has issues on some versions of Windows.
If you try using Red with 3.6 and experience issues, uninstall
Python 3.6 and install the latest version of Python 3.5
We also provide instructions for manually installing all of the dependencies.
******************************************
Installing using powershell and chocolatey
******************************************
To install via powershell, search "powershell" in the windows start menu,
right-click on it and then click "Run as administrator"
Then run each of the following commands:
.. code-block:: none
Set-ExecutionPolicy Bypass -Scope Process -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install git --params "/GitOnlyOnPath /WindowsTerminal" -y
choco install jre8 python -y; exit
********************************
Manually installing dependencies
********************************
* `Python <https://www.python.org/downloads/>`_ - Red needs Python 3.7.0 or greater
.. note:: Please make sure that the box to add Python to PATH is CHECKED, otherwise
you may run into issues when trying to run Red
you may run into issues when trying to run Red.
* `Git <https://git-scm.com/download/win>`_
.. attention:: Please choose the option to "Run Git from the Windows Command Prompt" in Git's setup
.. attention:: Please choose the option to "Run Git from the Windows Command Prompt" in Git's setup.
* `Java <https://java.com/en/download/manual.jsp>`_ - needed for Audio
.. attention:: Please choose the "Windows Online" installer.
.. _installing-red-windows:
--------------
Installing Red
--------------
.. attention:: You may need to restart your computer after installing dependencies
for the PATH changes to take effect.
1. Open a command prompt (open Start, search for "command prompt", then click it)
2. Run the appropriate command, depending on if you want audio or not
2. Create and activate a virtual environment (strongly recommended), see the section `using-venv`
3. Run **one** of the following commands, depending on what extras you want installed
* No audio: :code:`python -m pip install -U --process-dependency-links Red-DiscordBot`
* Audio: :code:`python -m pip install -U --process-dependency-links Red-DiscordBot[voice]`
* Development version (without audio): :code:`python -m pip install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot`
* Development version (with audio): :code:`python -m pip install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot[voice]`
.. note::
3. Once that has completed, run :code:`redbot-setup` to set up your instance
If you're not inside an activated virtual environment, include the ``--user`` flag with all
``pip`` commands.
* This will set the location where data will be stored, as well as your
storage backend and the name of the instance (which will be used for
running the bot)
* No MongoDB support:
4. Once done setting up the instance, run :code:`redbot <your instance name>` to run Red.
It will walk through the initial setup, asking for your token and a prefix
.. code-block:: none
python -m pip install -U Red-DiscordBot
* With MongoDB support:
.. code-block:: none
python -m pip install -U Red-DiscordBot[mongo]
.. note::
To install the development version, replace ``Red-DiscordBot`` in the above commands with the
following link:
.. code-block:: none
git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=Red-DiscordBot
--------------------------
Setting Up and Running Red
--------------------------
After installation, set up your instance with the following command:
.. code-block:: none
redbot-setup
This will set the location where data will be stored, as well as your
storage backend and the name of the instance (which will be used for
running the bot).
Once done setting up the instance, run the following command to run Red:
.. code-block:: none
redbot <your instance name>
It will walk through the initial setup, asking for your token and a prefix.
You can find out how to obtain a token with
`this guide <https://discordpy.readthedocs.io/en/v1.0.1/discord.html#creating-a-bot-account>`_,
section "Creating a Bot Account".
You may also run Red via the launcher, which allows you to restart the bot
from discord, and enable auto-restart. You may also update the bot from the
launcher menu. Use the following command to run the launcher:
.. code-block:: none
redbot-launcher

View File

@@ -1,4 +1,2 @@
sphinx==1.6.3
sphinxcontrib-asyncio
sphinx_rtd_theme
git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py[voice]
# We still need this because RTD is special
setuptools==40.8.0

132
docs/venv_guide.rst Normal file
View File

@@ -0,0 +1,132 @@
.. _installing-in-virtual-environment:
=======================================
Installing Red in a Virtual Environment
=======================================
Virtual environments allow you to isolate red's library dependencies, cog dependencies and python
binaries from the rest of your system. It is strongly recommended you use this if you use python
for more than just Red.
.. _using-venv:
--------------
Using ``venv``
--------------
This is the quickest way to get your virtual environment up and running, as `venv` is shipped with
python.
First, choose a directory where you would like to create your virtual environment. It's a good idea
to keep it in a location which is easy to type out the path to. From now, we'll call it
``path/to/venv/`` (or ``path\to\venv\`` on Windows).
~~~~~~~~~~~~~~~~~~~~~~~~
``venv`` on Linux or Mac
~~~~~~~~~~~~~~~~~~~~~~~~
Create your virtual environment with the following command::
python3.7 -m venv path/to/venv/
And activate it with the following command::
source path/to/venv/bin/activate
.. important::
You must activate the virtual environment with the above command every time you open a new
shell to run, install or update Red.
Continue reading `below <after-activating-virtual-environment>`.
~~~~~~~~~~~~~~~~~~~
``venv`` on Windows
~~~~~~~~~~~~~~~~~~~
Create your virtual environment with the following command::
python -m venv path\to\venv\
And activate it with the following command::
path\to\venv\Scripts\activate.bat
.. important::
You must activate the virtual environment with the above command every time you open a new
Command Prompt to run, install or update Red.
Continue reading `below <after-activating-virtual-environment>`.
.. _using-pyenv-virtualenv:
--------------------------
Using ``pyenv virtualenv``
--------------------------
.. note::
This is for non-Windows users only.
Using ``pyenv virtualenv`` saves you the headache of remembering where you installed your virtual
environments. If you haven't already, install pyenv with `pyenv-installer`_.
First, ensure your pyenv interpreter is set to python 3.7.0 or greater with the following command::
pyenv version
Now, create a virtual environment with the following command::
pyenv virtualenv <name>
Replace ``<name>`` with whatever you like. If you forget what you named it, use the command ``pyenv
versions``.
Now activate your virtualenv with the following command::
pyenv shell <name>
.. important::
You must activate the virtual environment with the above command every time you open a new
shell to run, install or update Red.
Continue reading `below <after-activating-virtual-environment>`.
.. _pyenv-installer: https://github.com/pyenv/pyenv-installer/blob/master/README.rst
----
.. _after-activating-virtual-environment:
Once activated, your ``PATH`` environment variable will be modified to use the virtual
environment's python executables, as well as other executables like ``pip``.
From here, install Red using the commands listed on your installation guide (`Windows
<installing-red-windows>` or `Non-Windows <installing-red-linux-mac>`).
.. note::
The alternative to activating the virtual environment each time you open a new shell is to
provide the full path to the executable. This will automatically use the virtual environment's
python interpreter and installed libraries.
--------------------------------------------
Virtual Environments with Multiple Instances
--------------------------------------------
If you are running multiple instances of Red on the same machine, you have the option of either
using the same virtual environment for all of them, or creating separate ones.
.. note::
This only applies for multiple instances of V3. If you are running a V2 instance as well,
You **must** use separate virtual environments.
The advantages of using a *single* virtual environment for all of your V3 instances are:
- When updating Red, you will only need to update it once for all instances (however you will still need to restart all instances for the changes to take effect)
- It will save space on your hard drive
On the other hand, you may wish to update each of your instances individually.
.. important::
Windows users with multiple instances should create *separate* virtual environments, as
updating multiple running instances at once is likely to cause errors.

View File

@@ -1,33 +0,0 @@
import subprocess
import os
import sys
def main():
interpreter = sys.executable
print(interpreter)
root_dir = os.getcwd()
cogs = [i for i in os.listdir("redbot/cogs") if os.path.isdir(os.path.join("redbot/cogs", i))]
for d in cogs:
if "locales" in os.listdir(os.path.join("redbot/cogs", d)):
os.chdir(os.path.join("redbot/cogs", d, "locales"))
if "regen_messages.py" not in os.listdir(os.getcwd()):
print("Directory 'locales' exists for {} but no 'regen_messages.py' is available!".format(d))
exit(1)
else:
print("Running 'regen_messages.py' for {}".format(d))
retval = subprocess.run([interpreter, "regen_messages.py"])
if retval.returncode != 0:
exit(1)
os.chdir(root_dir)
os.chdir("redbot/core/locales")
print("Running 'regen_messages.py' for core")
retval = subprocess.run([interpreter, "regen_messages.py"])
if retval.returncode != 0:
exit(1)
os.chdir(root_dir)
subprocess.run(["crowdin", "upload"])
if __name__ == "__main__":
main()

42
make.bat Normal file
View File

@@ -0,0 +1,42 @@
@echo off
if [%1] == [] goto help
REM This allows us to expand variables at execution
setlocal ENABLEDELAYEDEXPANSION
REM This will set PYFILES as a list of tracked .py files
set PYFILES=
for /F "tokens=* USEBACKQ" %%A in (`git ls-files "*.py"`) do (
set PYFILES=!PYFILES! %%A
)
goto %1
:reformat
black -l 99 !PYFILES!
exit /B %ERRORLEVEL%
:stylecheck
black -l 99 --check !PYFILES!
exit /B %ERRORLEVEL%
:newenv
py -3.7 -m venv --clear .venv
.\.venv\Scripts\python -m pip install -U pip setuptools
goto syncenv
:syncenv
.\.venv\Scripts\python -m pip install -Ur .\tools\dev-requirements.txt
exit /B %ERRORLEVEL%
:help
echo Usage:
echo make ^<command^>
echo.
echo Commands:
echo reformat Reformat all .py files being tracked by git.
echo stylecheck Check which tracked .py files need reformatting.
echo newenv Create or replace this project's virtual environment.
echo syncenv Sync this project's virtual environment to Red's latest
echo dependencies.

View File

@@ -1,11 +1,180 @@
import sys
import typing
import discord
import re as _re
import sys as _sys
import warnings as _warnings
from math import inf as _inf
from typing import (
ClassVar as _ClassVar,
Dict as _Dict,
List as _List,
Optional as _Optional,
Pattern as _Pattern,
Tuple as _Tuple,
Union as _Union,
)
# Let's do all the dumb version checking in one place.
if discord.version_info.major < 1:
print("You are not running the rewritten version of discord.py.\n\n"
"In order to use Red v3 you MUST be running d.py version"
" >= 1.0.0.")
sys.exit(1)
MIN_PYTHON_VERSION = (3, 7, 0)
__all__ = ["MIN_PYTHON_VERSION", "__version__", "version_info", "VersionInfo"]
if _sys.version_info < MIN_PYTHON_VERSION:
print(
f"Python {'.'.join(map(str, MIN_PYTHON_VERSION))} is required to run Red, but you have "
f"{_sys.version}! Please update Python."
)
_sys.exit(1)
class VersionInfo:
ALPHA = "alpha"
BETA = "beta"
RELEASE_CANDIDATE = "release candidate"
FINAL = "final"
_VERSION_STR_PATTERN: _ClassVar[_Pattern[str]] = _re.compile(
r"^"
r"(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<micro>0|[1-9]\d*)"
r"(?:(?P<releaselevel>a|b|rc)(?P<serial>0|[1-9]\d*))?"
r"(?:\.post(?P<post_release>0|[1-9]\d*))?"
r"(?:\.dev(?P<dev_release>0|[1-9]\d*))?"
r"$",
flags=_re.IGNORECASE,
)
_RELEASE_LEVELS: _ClassVar[_List[str]] = [ALPHA, BETA, RELEASE_CANDIDATE, FINAL]
_SHORT_RELEASE_LEVELS: _ClassVar[_Dict[str, str]] = {
"a": ALPHA,
"b": BETA,
"rc": RELEASE_CANDIDATE,
}
def __init__(
self,
major: int,
minor: int,
micro: int,
releaselevel: str,
serial: _Optional[int] = None,
post_release: _Optional[int] = None,
dev_release: _Optional[int] = None,
) -> None:
self.major: int = major
self.minor: int = minor
self.micro: int = micro
if releaselevel not in self._RELEASE_LEVELS:
raise TypeError(f"'releaselevel' must be one of: {', '.join(self._RELEASE_LEVELS)}")
self.releaselevel: str = releaselevel
self.serial: _Optional[int] = serial
self.post_release: _Optional[int] = post_release
self.dev_release: _Optional[int] = dev_release
@classmethod
def from_str(cls, version_str: str) -> "VersionInfo":
"""Parse a string into a VersionInfo object.
Raises
------
ValueError
If the version info string is invalid.
"""
match = cls._VERSION_STR_PATTERN.match(version_str)
if not match:
raise ValueError(f"Invalid version string: {version_str}")
kwargs: _Dict[str, _Union[str, int]] = {}
for key in ("major", "minor", "micro"):
kwargs[key] = int(match[key])
releaselevel = match["releaselevel"]
if releaselevel is not None:
kwargs["releaselevel"] = cls._SHORT_RELEASE_LEVELS[releaselevel]
else:
kwargs["releaselevel"] = cls.FINAL
for key in ("serial", "post_release", "dev_release"):
if match[key] is not None:
kwargs[key] = int(match[key])
return cls(**kwargs)
@classmethod
def from_json(
cls, data: _Union[_Dict[str, _Union[int, str]], _List[_Union[int, str]]]
) -> "VersionInfo":
if isinstance(data, _List):
# For old versions, data was stored as a list:
# [MAJOR, MINOR, MICRO, RELEASELEVEL, SERIAL]
return cls(*data)
else:
return cls(**data)
def to_json(self) -> _Dict[str, _Union[int, str]]:
return {
"major": self.major,
"minor": self.minor,
"micro": self.micro,
"releaselevel": self.releaselevel,
"serial": self.serial,
"post_release": self.post_release,
"dev_release": self.dev_release,
}
def _generate_comparison_tuples(
self, other: "VersionInfo"
) -> _List[
_Tuple[int, int, int, int, _Union[int, float], _Union[int, float], _Union[int, float]]
]:
tups: _List[
_Tuple[int, int, int, int, _Union[int, float], _Union[int, float], _Union[int, float]]
] = []
for obj in (self, other):
tups.append(
(
obj.major,
obj.minor,
obj.micro,
obj._RELEASE_LEVELS.index(obj.releaselevel),
obj.serial if obj.serial is not None else _inf,
obj.post_release if obj.post_release is not None else -_inf,
obj.dev_release if obj.dev_release is not None else _inf,
)
)
return tups
def __lt__(self, other: "VersionInfo") -> bool:
tups = self._generate_comparison_tuples(other)
return tups[0] < tups[1]
def __eq__(self, other: "VersionInfo") -> bool:
tups = self._generate_comparison_tuples(other)
return tups[0] == tups[1]
def __le__(self, other: "VersionInfo") -> bool:
tups = self._generate_comparison_tuples(other)
return tups[0] <= tups[1]
def __str__(self) -> str:
ret = f"{self.major}.{self.minor}.{self.micro}"
if self.releaselevel != self.FINAL:
short = next(
k for k, v in self._SHORT_RELEASE_LEVELS.items() if v == self.releaselevel
)
ret += f"{short}{self.serial}"
if self.post_release is not None:
ret += f".post{self.post_release}"
if self.dev_release is not None:
ret += f".dev{self.dev_release}"
return ret
def __repr__(self) -> str:
return (
"VersionInfo(major={major}, minor={minor}, micro={micro}, "
"releaselevel={releaselevel}, serial={serial}, post={post_release}, "
"dev={dev_release})".format(**self.to_json())
)
__version__ = "3.1.6"
version_info = VersionInfo.from_str(__version__)
# Filter fuzzywuzzy slow sequence matcher warning
_warnings.filterwarnings("ignore", module=r"fuzzywuzzy.*")

View File

@@ -2,23 +2,42 @@
# Discord Version check
import sys
import discord
from redbot.core.bot import Red, ExitCodes
from redbot.core.cog_manager import CogManagerUI
from redbot.core.data_manager import load_basic_configuration, config_file
from redbot.core.json_io import JsonIO
from redbot.core.global_checks import init_global_checks
from redbot.core.events import init_events
from redbot.core.cli import interactive_config, confirm, parse_cli_flags, ask_sentry
from redbot.core.core_commands import Core
from redbot.core.dev_commands import Dev
from redbot.core import rpc, __version__
import asyncio
import logging.handlers
import json
import logging
import os
import sys
import discord
# Set the event loop policies here so any subsequent `get_event_loop()`
# calls, in particular those as a result of the following imports,
# return the correct loop object.
if sys.platform == "win32":
asyncio.set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy())
elif sys.implementation.name == "cpython":
# Let's not force this dependency, uvloop is much faster on cpython
try:
import uvloop
except ImportError:
uvloop = None
pass
else:
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
import redbot.logging
from redbot.core.bot import Red, ExitCodes
from redbot.core.cog_manager import CogManagerUI
from redbot.core.global_checks import init_global_checks
from redbot.core.events import init_events
from redbot.core.cli import interactive_config, confirm, parse_cli_flags
from redbot.core.core_commands import Core
from redbot.core.dev_commands import Dev
from redbot.core import __version__, modlog, bank, data_manager
from signal import SIGTERM
log = logging.getLogger("red.main")
#
# Red - Discord Bot v3
@@ -27,67 +46,26 @@ import os
#
def init_loggers(cli_flags):
# d.py stuff
dpy_logger = logging.getLogger("discord")
dpy_logger.setLevel(logging.WARNING)
console = logging.StreamHandler()
console.setLevel(logging.WARNING)
dpy_logger.addHandler(console)
# Red stuff
logger = logging.getLogger("red")
red_format = logging.Formatter(
'%(asctime)s %(levelname)s %(module)s %(funcName)s %(lineno)d: '
'%(message)s',
datefmt="[%d/%m/%Y %H:%M]")
stdout_handler = logging.StreamHandler(sys.stdout)
stdout_handler.setFormatter(red_format)
if cli_flags.debug:
os.environ['PYTHONASYNCIODEBUG'] = '1'
logger.setLevel(logging.DEBUG)
else:
logger.setLevel(logging.WARNING)
from redbot.core.data_manager import core_data_path
logfile_path = core_data_path() / 'red.log'
fhandler = logging.handlers.RotatingFileHandler(
filename=str(logfile_path), encoding='utf-8', mode='a',
maxBytes=10**7, backupCount=5)
fhandler.setFormatter(red_format)
logger.addHandler(fhandler)
logger.addHandler(stdout_handler)
# Sentry stuff
sentry_logger = logging.getLogger("red.sentry")
sentry_logger.setLevel(logging.WARNING)
return logger, sentry_logger
async def _get_prefix_and_token(red, indict):
"""
Again, please blame <@269933075037814786> for this.
:param indict:
:return:
"""
indict['token'] = await red.db.token()
indict['prefix'] = await red.db.prefix()
indict['enable_sentry'] = await red.db.enable_sentry()
indict["token"] = await red.db.token()
indict["prefix"] = await red.db.prefix()
def list_instances():
if not config_file.exists():
print("No instances have been configured! Configure one "
"using `redbot-setup` before trying to run the bot!")
if not data_manager.config_file.exists():
print(
"No instances have been configured! Configure one "
"using `redbot-setup` before trying to run the bot!"
)
sys.exit(1)
else:
data = JsonIO(config_file)._load_json()
with data_manager.config_file.open(encoding="utf-8") as fs:
data = json.load(fs)
text = "Configured Instances:\n\n"
for instance_name in sorted(data.keys()):
text += "{}\n".format(instance_name)
@@ -95,50 +73,84 @@ def list_instances():
sys.exit(0)
async def sigterm_handler(red, log):
log.info("SIGTERM received. Quitting...")
await red.shutdown(restart=False)
def main():
description = "Red V3"
cli_flags = parse_cli_flags(sys.argv[1:])
if cli_flags.list_instances:
list_instances()
elif not cli_flags.instance_name:
elif cli_flags.version:
print(description)
print("Current Version: {}".format(__version__))
sys.exit(0)
elif not cli_flags.instance_name and not cli_flags.no_instance:
print("Error: No instance name was provided!")
sys.exit(1)
load_basic_configuration(cli_flags.instance_name)
log, sentry_log = init_loggers(cli_flags)
description = "Red - Version {}".format(__version__)
red = Red(cli_flags, description=description, pm_help=None)
if cli_flags.no_instance:
print(
"\033[1m"
"Warning: The data will be placed in a temporary folder and removed on next system "
"reboot."
"\033[0m"
)
cli_flags.instance_name = "temporary_red"
data_manager.create_temp_config()
data_manager.load_basic_configuration(cli_flags.instance_name)
redbot.logging.init_logging(
level=cli_flags.logging_level, location=data_manager.core_data_path() / "logs"
)
log.debug("====Basic Config====")
log.debug("Data Path: %s", data_manager._base_data_path())
log.debug("Storage Type: %s", data_manager.storage_type())
red = Red(
cli_flags=cli_flags, description=description, dm_help=None, fetch_offline_members=True
)
loop = asyncio.get_event_loop()
loop.run_until_complete(red.maybe_update_config())
init_global_checks(red)
init_events(red, cli_flags)
red.add_cog(Core(red))
red.add_cog(CogManagerUI())
if cli_flags.dev:
red.add_cog(Dev())
loop = asyncio.get_event_loop()
# noinspection PyProtectedMember
loop.run_until_complete(modlog._init())
# noinspection PyProtectedMember
bank._init()
if os.name == "posix":
loop.add_signal_handler(SIGTERM, lambda: asyncio.ensure_future(sigterm_handler(red, log)))
tmp_data = {}
loop.run_until_complete(_get_prefix_and_token(red, tmp_data))
token = os.environ.get("RED_TOKEN", tmp_data['token'])
prefix = cli_flags.prefix or tmp_data['prefix']
if token is None or not prefix:
token = os.environ.get("RED_TOKEN", tmp_data["token"])
if cli_flags.token:
token = cli_flags.token
prefix = cli_flags.prefix or tmp_data["prefix"]
if not (token and prefix):
if cli_flags.no_prompt is False:
new_token = interactive_config(red, token_set=bool(token),
prefix_set=bool(prefix))
new_token = interactive_config(red, token_set=bool(token), prefix_set=bool(prefix))
if new_token:
token = new_token
else:
log.critical("Token and prefix must be set in order to login.")
sys.exit(1)
loop.run_until_complete(_get_prefix_and_token(red, tmp_data))
if tmp_data['enable_sentry']:
red.enable_sentry()
cleanup_tasks = True
if cli_flags.dry_run:
loop.run_until_complete(red.http.close())
sys.exit(0)
try:
loop.run_until_complete(red.start(token, bot=not cli_flags.not_bot))
loop.run_until_complete(red.start(token, bot=True))
except discord.LoginFailure:
cleanup_tasks = False # No login happened, no need for this
log.critical("This token doesn't seem to be valid. If it belongs to "
"a user account, remember that the --not-bot flag "
"must be used. For self-bot functionalities instead, "
"--self-bot")
db_token = red.db.token()
log.critical("This token doesn't seem to be valid.")
db_token = loop.run_until_complete(red.db.token())
if db_token and not cli_flags.no_prompt:
print("\nDo you want to reset the token? (y/n)")
if confirm("> "):
@@ -150,18 +162,18 @@ def main():
red._shutdown_mode = ExitCodes.SHUTDOWN
except Exception as e:
log.critical("Fatal exception", exc_info=e)
sentry_log.critical("Fatal Exception", exc_info=e)
loop.run_until_complete(red.logout())
finally:
rpc.clean_up()
if cleanup_tasks:
pending = asyncio.Task.all_tasks(loop=red.loop)
gathered = asyncio.gather(
*pending, loop=red.loop, return_exceptions=True)
gathered.cancel()
pending = asyncio.Task.all_tasks(loop=red.loop)
gathered = asyncio.gather(*pending, loop=red.loop, return_exceptions=True)
gathered.cancel()
try:
loop.run_until_complete(red.rpc.close())
except AttributeError:
pass
sys.exit(red._shutdown_mode.value)
if __name__ == '__main__':
if __name__ == "__main__":
main()

View File

@@ -1,70 +1,79 @@
import logging
from typing import Tuple
import discord
from discord.ext import commands
from redbot.core import Config, checks
import logging
from redbot.core import Config, checks, commands
from redbot.core.i18n import Translator, cog_i18n
from redbot.core.utils.chat_formatting import box
from .announcer import Announcer
from .converters import MemberDefaultAuthor, SelfRole
log = logging.getLogger("red.admin")
GENERIC_FORBIDDEN = (
T_ = Translator("Admin", __file__)
_ = lambda s: s
GENERIC_FORBIDDEN = _(
"I attempted to do something that Discord denied me permissions for."
" Your command failed to successfully complete."
)
HIERARCHY_ISSUE = (
"I tried to add {role.name} to {member.display_name} but that role"
" is higher than my highest role in the Discord heirarchy so I was"
HIERARCHY_ISSUE = _(
"I tried to {verb} {role.name} to {member.display_name} but that role"
" is higher than my highest role in the Discord hierarchy so I was"
" unable to successfully add it. Please give me a higher role and "
"try again."
)
USER_HIERARCHY_ISSUE = (
"I tried to add {role.name} to {member.display_name} but that role"
" is higher than your highest role in the Discord heirarchy so I was"
USER_HIERARCHY_ISSUE = _(
"I tried to {verb} {role.name} to {member.display_name} but that role"
" is higher than your highest role in the Discord hierarchy so I was"
" unable to successfully add it. Please get a higher role and "
"try again."
)
RUNNING_ANNOUNCEMENT = (
ROLE_USER_HIERARCHY_ISSUE = _(
"I tried to edit {role.name} but that role"
" is higher than your highest role in the Discord hierarchy so I was"
" unable to successfully add it. Please get a higher role and "
"try again."
)
RUNNING_ANNOUNCEMENT = _(
"I am already announcing something. If you would like to make a"
" different announcement please use `{prefix}announce cancel`"
" first."
)
_ = T_
class Admin:
@cog_i18n(_)
class Admin(commands.Cog):
"""A collection of server administration utilities."""
def __init__(self, config=Config):
self.conf = config.get_conf(self, 8237492837454039,
force_registration=True)
super().__init__()
self.conf = config.get_conf(self, 8237492837454039, force_registration=True)
self.conf.register_global(
serverlocked=False
)
self.conf.register_global(serverlocked=False)
self.conf.register_guild(
announce_ignore=False,
announce_channel=None, # Integer ID
selfroles=[] # List of integer ID's
selfroles=[], # List of integer ID's
)
self.__current_announcer = None
def __unload(self):
def cog_unload(self):
try:
self.__current_announcer.cancel()
except AttributeError:
pass
@staticmethod
async def complain(ctx: commands.Context, message: str,
**kwargs):
async def complain(ctx: commands.Context, message: str, **kwargs):
await ctx.send(message.format(**kwargs))
def is_announcing(self) -> bool:
@@ -78,8 +87,7 @@ class Admin:
return self.__current_announcer.active or False
@staticmethod
def pass_heirarchy_check(ctx: commands.Context,
role: discord.Role) -> bool:
def pass_hierarchy_check(ctx: commands.Context, role: discord.Role) -> bool:
"""
Determines if the bot has a higher role than the given one.
:param ctx:
@@ -89,8 +97,7 @@ class Admin:
return ctx.guild.me.top_role > role
@staticmethod
def pass_user_heirarchy_check(ctx: commands.Context,
role: discord.Role) -> bool:
def pass_user_hierarchy_check(ctx: commands.Context, role: discord.Role) -> bool:
"""
Determines if a user is allowed to add/remove/edit the given role.
:param ctx:
@@ -99,193 +106,201 @@ class Admin:
"""
return ctx.author.top_role > role
async def _addrole(self, ctx: commands.Context, member: discord.Member,
role: discord.Role):
async def _addrole(self, ctx: commands.Context, member: discord.Member, role: discord.Role):
try:
await member.add_roles(role)
except discord.Forbidden:
if not self.pass_heirarchy_check(ctx, role):
await self.complain(ctx, HIERARCHY_ISSUE, role=role,
member=member)
if not self.pass_hierarchy_check(ctx, role):
await self.complain(
ctx, T_(HIERARCHY_ISSUE), role=role, member=member, verb=_("add")
)
else:
await self.complain(ctx, GENERIC_FORBIDDEN)
await self.complain(ctx, T_(GENERIC_FORBIDDEN))
else:
await ctx.send("I successfully added {role.name} to"
" {member.display_name}".format(
role=role, member=member
))
await ctx.send(
_("I successfully added {role.name} to {member.display_name}").format(
role=role, member=member
)
)
async def _removerole(self, ctx: commands.Context, member: discord.Member,
role: discord.Role):
async def _removerole(self, ctx: commands.Context, member: discord.Member, role: discord.Role):
try:
await member.remove_roles(role)
except discord.Forbidden:
if not self.pass_heirarchy_check(ctx, role):
await self.complain(ctx, HIERARCHY_ISSUE, role=role,
member=member)
if not self.pass_hierarchy_check(ctx, role):
await self.complain(
ctx, T_(HIERARCHY_ISSUE), role=role, member=member, verb=_("remove")
)
else:
await self.complain(ctx, GENERIC_FORBIDDEN)
await self.complain(ctx, T_(GENERIC_FORBIDDEN))
else:
await ctx.send("I successfully removed {role.name} from"
" {member.display_name}".format(
role=role, member=member
))
await ctx.send(
_("I successfully removed {role.name} from {member.display_name}").format(
role=role, member=member
)
)
@commands.command()
@commands.guild_only()
@checks.admin_or_permissions(manage_roles=True)
async def addrole(self, ctx: commands.Context, rolename: discord.Role,
user: MemberDefaultAuthor=None):
async def addrole(
self, ctx: commands.Context, rolename: discord.Role, *, user: MemberDefaultAuthor = None
):
"""Add a role to a user.
If user is left blank it defaults to the author of the command.
"""
Adds a role to a user. If user is left blank it defaults to the
author of the command.
"""
if self.pass_user_heirarchy_check(ctx, rolename):
if user is None:
user = ctx.author
if self.pass_user_hierarchy_check(ctx, rolename):
# noinspection PyTypeChecker
await self._addrole(ctx, user, rolename)
else:
await self.complain(ctx, USER_HIERARCHY_ISSUE)
await self.complain(
ctx, T_(USER_HIERARCHY_ISSUE), member=user, role=rolename, verb=_("add")
)
@commands.command()
@commands.guild_only()
@checks.admin_or_permissions(manage_roles=True)
async def removerole(self, ctx: commands.Context, rolename: discord.Role,
user: MemberDefaultAuthor=None):
async def removerole(
self, ctx: commands.Context, rolename: discord.Role, *, user: MemberDefaultAuthor = None
):
"""Remove a role from a user.
If user is left blank it defaults to the author of the command.
"""
Removes a role from a user. If user is left blank it defaults to the
author of the command.
"""
if self.pass_user_heirarchy_check(ctx, rolename):
if user is None:
user = ctx.author
if self.pass_user_hierarchy_check(ctx, rolename):
# noinspection PyTypeChecker
await self._removerole(ctx, user, rolename)
else:
await self.complain(ctx, USER_HIERARCHY_ISSUE)
await self.complain(
ctx, T_(USER_HIERARCHY_ISSUE), member=user, role=rolename, verb=_("remove")
)
@commands.group()
@commands.guild_only()
@checks.admin_or_permissions(manage_roles=True)
async def editrole(self, ctx: commands.Context):
"""Edits roles settings"""
if ctx.invoked_subcommand is None:
await ctx.send_help()
"""Edit role settings."""
pass
@editrole.command(name="colour", aliases=["color", ])
async def editrole_colour(self, ctx: commands.Context, role: discord.Role,
value: discord.Colour):
"""Edits a role's colour
@editrole.command(name="colour", aliases=["color"])
async def editrole_colour(
self, ctx: commands.Context, role: discord.Role, value: discord.Colour
):
"""Edit a role's colour.
Use double quotes if the role contains spaces.
Colour must be in hexadecimal format.
\"http://www.w3schools.com/colors/colors_picker.asp\"
Examples:
!editrole colour \"The Transistor\" #ff0000
!editrole colour Test #ff9900"""
author = ctx.author
reason = "{}({}) changed the colour of role '{}'".format(
author.name, author.id, role.name)
[Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)
if not self.pass_user_heirarchy_check(ctx, role):
await self.complain(ctx, USER_HIERARCHY_ISSUE)
Examples:
`[p]editrole colour "The Transistor" #ff0000`
`[p]editrole colour Test #ff9900`
"""
author = ctx.author
reason = "{}({}) changed the colour of role '{}'".format(author.name, author.id, role.name)
if not self.pass_user_hierarchy_check(ctx, role):
await self.complain(ctx, T_(ROLE_USER_HIERARCHY_ISSUE), role=role)
return
try:
await role.edit(reason=reason, color=value)
except discord.Forbidden:
await self.complain(ctx, GENERIC_FORBIDDEN)
await self.complain(ctx, T_(GENERIC_FORBIDDEN))
else:
log.info(reason)
await ctx.send("Done.")
await ctx.send(_("Done."))
@editrole.command(name="name")
@checks.admin_or_permissions(administrator=True)
async def edit_role_name(self, ctx: commands.Context, role: discord.Role, *, name: str):
"""Edits a role's name
"""Edit a role's name.
Use double quotes if the role or the name contain spaces.
Examples:
!editrole name \"The Transistor\" Test"""
`[p]editrole name \"The Transistor\" Test`
"""
author = ctx.message.author
old_name = role.name
reason = "{}({}) changed the name of role '{}' to '{}'".format(
author.name, author.id, old_name, name)
author.name, author.id, old_name, name
)
if not self.pass_user_heirarchy_check(ctx, role):
await self.complain(ctx, USER_HIERARCHY_ISSUE)
if not self.pass_user_hierarchy_check(ctx, role):
await self.complain(ctx, T_(ROLE_USER_HIERARCHY_ISSUE), role=role)
return
try:
await role.edit(reason=reason, name=name)
except discord.Forbidden:
await self.complain(ctx, GENERIC_FORBIDDEN)
await self.complain(ctx, T_(GENERIC_FORBIDDEN))
else:
log.info(reason)
await ctx.send("Done.")
await ctx.send(_("Done."))
@commands.group(invoke_without_command=True)
@checks.is_owner()
async def announce(self, ctx: commands.Context, message: str):
"""
Announces a message to all servers the bot is in.
"""
async def announce(self, ctx: commands.Context, *, message: str):
"""Announce a message to all servers the bot is in."""
if not self.is_announcing():
announcer = Announcer(ctx, message, config=self.conf)
announcer.start()
self.__current_announcer = announcer
await ctx.send("The announcement has begun.")
await ctx.send(_("The announcement has begun."))
else:
prefix = ctx.prefix
await self.complain(ctx, RUNNING_ANNOUNCEMENT,
prefix=prefix)
await self.complain(ctx, T_(RUNNING_ANNOUNCEMENT), prefix=prefix)
@announce.command(name="cancel")
@checks.is_owner()
async def announce_cancel(self, ctx):
"""
Cancels a running announce.
"""
"""Cancel a running announce."""
try:
self.__current_announcer.cancel()
except AttributeError:
pass
await ctx.send("The current announcement has been cancelled.")
await ctx.send(_("The current announcement has been cancelled."))
@announce.command(name="channel")
@commands.guild_only()
@checks.guildowner_or_permissions(administrator=True)
async def announce_channel(self, ctx, channel: discord.TextChannel=None):
"""
Changes the channel on which the bot makes announcements.
"""
async def announce_channel(self, ctx, *, channel: discord.TextChannel = None):
"""Change the channel to which the bot makes announcements."""
if channel is None:
channel = ctx.channel
await self.conf.guild(ctx.guild).set("announce_channel", channel.id)
await self.conf.guild(ctx.guild).announce_channel.set(channel.id)
await ctx.send("The announcement channel has been set to {}".format(
channel.mention
))
await ctx.send(
_("The announcement channel has been set to {channel.mention}").format(channel=channel)
)
@announce.command(name="ignore")
@commands.guild_only()
@checks.guildowner_or_permissions(administrator=True)
async def announce_ignore(self, ctx, guild: discord.Guild=None):
"""
Toggles whether the announcements will ignore the given server.
Defaults to the current server if none is provided.
"""
if guild is None:
guild = ctx.guild
async def announce_ignore(self, ctx):
"""Toggle announcements being enabled this server."""
ignored = await self.conf.guild(ctx.guild).announce_ignore()
await self.conf.guild(ctx.guild).announce_ignore.set(not ignored)
ignored = await self.conf.guild(guild).announce_ignore()
await self.conf.guild(guild).announce_ignore.set(not ignored)
verb = "will" if ignored else "will not"
await ctx.send("The server {} {} receive announcements.".format(
guild.name, verb
))
if ignored: # Keeping original logic....
await ctx.send(
_("The server {guild.name} will receive announcements.").format(guild=ctx.guild)
)
else:
await ctx.send(
_("The server {guild.name} will not receive announcements.").format(
guild=ctx.guild
)
)
async def _valid_selfroles(self, guild: discord.Guild) -> Tuple[discord.Role]:
"""
@@ -300,50 +315,56 @@ class Admin:
valid_role_ids = set(r.id for r in valid_roles)
if selfrole_ids != valid_role_ids:
await self.conf.guild(guild).selfroles.set(valid_role_ids)
await self.conf.guild(guild).selfroles.set(list(valid_role_ids))
# noinspection PyTypeChecker
return valid_roles
@commands.guild_only()
@commands.group(invoke_without_command=True)
async def selfrole(self, ctx: commands.Context, selfrole: SelfRole):
"""
Add a role to yourself that server admins have configured as
user settable.
async def selfrole(self, ctx: commands.Context, *, selfrole: SelfRole):
"""Add a role to yourself.
Server admins must have configured the role as user settable.
NOTE: The role is case sensitive!
"""
# noinspection PyTypeChecker
await self._addrole(ctx, ctx.author, selfrole)
@selfrole.command(name="remove")
async def selfrole_remove(self, ctx: commands.Context, selfrole: SelfRole):
"""
Removes a selfrole from yourself.
async def selfrole_remove(self, ctx: commands.Context, *, selfrole: SelfRole):
"""Remove a selfrole from yourself.
NOTE: The role is case sensitive!
"""
# noinspection PyTypeChecker
await self._removerole(ctx, ctx.author, selfrole)
@selfrole.command(name="add")
@commands.has_permissions(manage_roles=True)
async def selfrole_add(self, ctx: commands.Context, role: discord.Role):
"""
Add a role to the list of available selfroles.
@checks.admin_or_permissions(manage_roles=True)
async def selfrole_add(self, ctx: commands.Context, *, role: discord.Role):
"""Add a role to the list of available selfroles.
NOTE: The role is case sensitive!
"""
async with self.conf.guild(ctx.guild).selfroles() as curr_selfroles:
if role.id not in curr_selfroles:
curr_selfroles.append(role.id)
await ctx.send("The selfroles list has been successfully modified.")
await ctx.send(_("The selfroles list has been successfully modified."))
@selfrole.command(name="delete")
@commands.has_permissions(manage_roles=True)
async def selfrole_delete(self, ctx: commands.Context, role: SelfRole):
"""
Removes a role from the list of available selfroles.
@checks.admin_or_permissions(manage_roles=True)
async def selfrole_delete(self, ctx: commands.Context, *, role: SelfRole):
"""Remove a role from the list of available selfroles.
NOTE: The role is case sensitive!
"""
async with self.conf.guild(ctx.guild).selfroles() as curr_selfroles:
curr_selfroles.remove(role.id)
await ctx.send("The selfroles list has been successfully modified.")
await ctx.send(_("The selfroles list has been successfully modified."))
@selfrole.command(name="list")
async def selfrole_list(self, ctx: commands.Context):
@@ -353,7 +374,7 @@ class Admin:
selfroles = await self._valid_selfroles(ctx.guild)
fmt_selfroles = "\n".join(["+ " + r.name for r in selfroles])
msg = "Available Selfroles:\n{}".format(fmt_selfroles)
msg = _("Available Selfroles:\n{selfroles}").format(selfroles=fmt_selfroles)
await ctx.send(box(msg, "diff"))
async def _serverlock_check(self, guild: discord.Guild) -> bool:
@@ -370,18 +391,19 @@ class Admin:
@commands.command()
@checks.is_owner()
async def serverlock(self, ctx: commands.Context):
"""
Locks a bot to it's current servers only.
"""
"""Lock a bot to its current servers only."""
serverlocked = await self.conf.serverlocked()
await self.conf.serverlocked.set(not serverlocked)
verb = "is now" if not serverlocked else "is no longer"
if serverlocked:
await ctx.send(_("The bot is no longer serverlocked."))
else:
await ctx.send(_("The bot is now serverlocked."))
await ctx.send("The bot {} serverlocked.".format(verb))
# region Event Handlers
# region Event Handlers
async def on_guild_join(self, guild: discord.Guild):
if await self._serverlock_check(guild):
return
# endregion

View File

@@ -1,13 +1,14 @@
import asyncio
import discord
from discord.ext import commands
from redbot.core import commands
from redbot.core.i18n import Translator
_ = Translator("Announcer", __file__)
class Announcer:
def __init__(self, ctx: commands.Context,
message: str,
config=None):
def __init__(self, ctx: commands.Context, message: str, config=None):
"""
:param ctx:
:param message:
@@ -43,7 +44,10 @@ class Announcer:
channel = guild.get_channel(channel_id)
if channel is None:
channel = guild.default_channel
channel = guild.system_channel
if channel is None:
channel = guild.text_channels[0]
return channel
@@ -62,10 +66,9 @@ class Announcer:
try:
await channel.send(self.message)
except discord.Forbidden:
await bot_owner.send("I could not announce to guild: {}".format(
g.id
))
await bot_owner.send(
_("I could not announce to server: {server.id}").format(server=g)
)
await asyncio.sleep(0.5)
self.active = False

View File

@@ -1,5 +1,8 @@
import discord
from discord.ext import commands
from redbot.core import commands
from redbot.core.i18n import Translator
_ = Translator("AdminConverters", __file__)
class MemberDefaultAuthor(commands.Converter):
@@ -17,9 +20,9 @@ class MemberDefaultAuthor(commands.Converter):
class SelfRole(commands.Converter):
async def convert(self, ctx: commands.Context, arg: str) -> discord.Role:
admin = ctx.command.instance
admin = ctx.command.cog
if admin is None:
raise commands.BadArgument("Admin is not loaded.")
raise commands.BadArgument(_("The Admin cog is not loaded."))
conf = admin.conf
selfroles = await conf.guild(ctx.guild).selfroles()
@@ -28,6 +31,5 @@ class SelfRole(commands.Converter):
role = await role_converter.convert(ctx, arg)
if role.id not in selfroles:
raise commands.BadArgument("The provided role is not a valid"
" selfrole.")
raise commands.BadArgument(_("The provided role is not a valid selfrole."))
return role

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:12\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Arabic\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: ar\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: ar_SA\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr "حاولت القيام بشيء لا أملك تصريح من ديسكورد لفعله. فشل أمرك في إكمال نجاحه."
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr "أنا بالفعل أُعلن شيئاً. إذا كنت ترغب في إصدار إعلان مختلف الرجاء إستخدام `{prefix}announce cancel` أولاً."
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr "مجموعة من أدوات إدارة السيرفر."
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr "لقد قمت بنجاح بإضافة {role.name} إلى {member.display_name}"
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr "لقد قمت بنجاح بإزالة {role.name} من {member.display_name}"
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr "تعديل إعدادات الرتبة."
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "تم."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr "الإعلان عن رسالة إلى جميع السيرفرات المتواجد بها البوت."
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr "تم البدء في الإعلان."
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr "إلغاء إعلان جارٍ."
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr "تم إلغاء الإعلان الحالي."
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr "تعديل القناة التي يستخدمها البوت للإعلانات."
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr "تم تحديث قناة الإعلانات إلى {channel.mention}"
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr "تم تمكين الإعلانات في السيرفر."
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr "سيرفر {guild.name} سيتلقى إعلانات الآن."
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr "سيرفر {guild.name} لن يتلقى إعلانات."
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr "تم تحديث/تعديل قائمة الرتب الذاتية بنجاح."
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr "قفل البوت للسيرفر الحالي فقط."
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr "لم يعد البوت مقفول للسيرفر الحالي فقط."
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr "لقد تم قفل البوت للسيرفر الحالي فقط."
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr "لم أتمكن من الإعلان في السيرفر: {server.id}"
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr "لم يتم تحميل وحدة الأدمن cog."
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr "الرتبة المذكورة ليست على قائمة الرتب الذاتية."

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:12\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Bulgarian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: bg\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: bg_BG\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr ""
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Завършено."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-14 02:15\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Czech\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 3;\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: cs\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: cs_CZ\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr "Pokusil jsem se udělat něco, co mi Discord odepřel. Tvůj příkaz se nepodažilo úspěšně dokončit."
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr "Už něco oznamuji. Pokud bys rád provedl jiné oznámení, nejdříve použij `{prefix}announce cancel`."
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr "Kolekce nástrojů pro správu serveru."
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr "Úspěšně jsem přidal {role.name} k {member.display_name}"
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr "Úspěšně jsem odstranil {role.name} od {member.display_name}"
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr "Upraví nastavení role."
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Hotovo."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:12\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Danish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: da\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: da_DK\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr ""
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr ""
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:12\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: de\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: de_DE\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr "Ich habe versucht etwas zu tun, für das mir Discord die Befugnis verweigerte. Dein Befehl konnte nicht erfolgreich ausgeführt werden."
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr "Ich habe versucht {member.display_name} er Rolle: {role.name} {verb}, aber diese Rolle hat höhere Rechte als ich. Also war es nicht möglich die Rolle erfolgreich hinzuzufügen. Bitte geb mir eine höhere Rolle und versuche es erneut."
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr "Ich habe versucht die Rolle {role.name} an {member.display_name} zu {verb}, aber die Rolle ist höher als meine Rolle in der Discord Hierarchie, daher war es mir nicht möglich sie hinzuzufügen. Bitte gib mir eine höhere Rolle und versuche es erneut."
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr "Ich habe versucht {role.name} zu bearbeiten, aber die Rolle ist höher als deine höhste Rolle im Discord. Also konnte ich dies nicht erfolgreich hinzufügen. Versuche es mit einer höheren Rolle erneut."
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr "Ich kündige bereits etwas an. Wenn du eine andere Ankündigung machen willst, benutze bitte zuerst `{prefix}announce cancel`."
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr "Eine Sammlung von administrativen Server-Verwaltungsprogramme."
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr "hinzuzufügen"
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr "Ich habe erfolgreich {role.name} zu {member.display_name} hinzugefügt"
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr "entfernen"
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr "Ich habe erfolgreich {role.name} von {member.display_name} entfernt"
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr "Bearbeiten der Rollen Einstellungen."
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Erledigt."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr "Mache eine Ankündigung auf allen Servern auf denen der Bot ist."
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr "Die Ankündigung hat begonnen."
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr "Breche eine laufende Ankündigung ab."
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr "Die aktuelle Ankündigung wurde abgebrochen."
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr "Ändere den Kanal in dem der Bot Ankündigungen macht."
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr "Der für Ankündigungen gewählte Kanal wurde festgelegt auf {channel.mention}"
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr "Schaltet Ankündigungen auf diesem Server ein oder aus."
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr "Der Server {guild.name} wird Ankündigunen erhalten."
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr "Der Server {guild.name} wird keine Ankündigunen erhalten."
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr "Die Liste selbst auswählbarer Rollen wurde erfolgreich bearbeitet."
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr "Sperrt den Bot neuen Servern beizutreten."
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr "Der Bot ist nicht länger gesperrt neuen Servern beizutreten."
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr "Der Bot ist jetzt gesperrt neuen Servern beizutreten."
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr "Ich konnte keine Ankündigung auf diesem Server machen: {server.id}"
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr "Das Admin-Cog ist nicht geladen."
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr "Die vorausgesetzte Rolle ist keine berechtigte selbst auswählbare Rolle."

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:12\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Greek\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: el\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: el_GR\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr ""
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr ""
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-14 02:15\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Pirate English\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: en-PT\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: en_PT\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr ""
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Done."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-14 02:14\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Spanish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: es-ES\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: es_ES\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr "Intenté hacer algo que Discord me ha negado el permiso. Su comando no se pudo completar."
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr "He intentado agregar {verb} {role.name} a {member.display_name} pero ese rol es más alto que mi rol en la jerarquía de Discord, por lo que no he podido añadirlo con éxito. Por favor dame un rol más alto y vuelva a intentarlo."
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr "He intentado agregar {verb} {role.name} a {member.display_name} pero ese rol es más alto que mi rol en la jerarquía de Discord, por lo que no he podido añadirlo con éxito. Por favor dame un rol más alto y vuelva a intentarlo."
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr "He intentado agregar {role.name} a pero ese rol es más alto que mi rol en la jerarquía de Discord, por lo que no he podido añadirlo con éxito. Por favor dame un rol más alto y vuelva a intentarlo."
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr "Ya estoy anunciando algo. Si quieres hacer un anuncio diferente, por favor usa `{prefix}announce cancel` primero."
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr "Una colección de utilidades de administración de servidores."
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr "añadir"
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr "He añadido con éxito {role.name} a {member.display_name}"
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr "eliminar"
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr "He retirado con éxito {role.name} de {member.display_name}"
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr "Añadir un rol a un usuario.\\n\\n Si el usuario se deja en blanco, por defecto se convierte en autor del comando.\\n "
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr "Eliminar un rol de un usuario.\\n\\n Si el usuario se deja en blanco, por defecto se convierte en autor del comando.\\n "
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr "Editar configuración de rol."
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Listo."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr "Anunciar un mensaje a todos los servidores en que el bot está."
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr "El bot está bloqueado por el servidor."
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr "No pude anunciar en servidor: {server.id}"
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr "El cog Admin no está cargado."
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr "El rol proporcionado no es un selfrole válido."

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-14 02:15\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Finnish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: fi\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: fi_FI\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr "Yritin tehdä jotain, jonka Discord kielsi minulle luvat. Komento epäonnistui onnistuneesti."
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr "Yritin {verb} {role.name} kohtaan {member.display_name}, mutta tämä rooli on suurempi kuin korkein roolini Discord-hierarkiassa, joten en voinut lisätä sitä onnistuneesti. Anna minulle suurempi rooli ja yritä uudelleen."
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr "Yritin {verb} {role.name} kohtaan {member.display_name}, mutta tämä rooli on korkeampi kuin korkein rooli Discord-hierarkiassa, joten en voinut lisätä sitä onnistuneesti. Hanki suurempi rooli ja yritä uudelleen."
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr "Yritin muokata {role.name}, mutta tämä rooli on korkeampi kuin korkein rooli Discord-hierarkiassa, joten en voinut lisätä sitä onnistuneesti. Hanki suurempi rooli ja yritä uudelleen."
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr "Olen jo ilmoittanut jotain. Jos haluat tehdä toisen ilmoituksen, käytä ensin \"{prefix} announce cancel\"."
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr "Kokoelma palvelinhallintaohjelmia."
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr "lisätä"
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr "Lisäsin {role.name} onnistuneesti {member.display_name}"
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr "poistaa"
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr "Olen poistanut {role.name} onnistuneesti {member.display_name}"
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr "Muokkaa rooliasetuksia."
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Tehty."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr "Ilmoita viesti kaikille palvelimille, joihin botti on."
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:11\n"
"Last-Translator: Robert Jansen (Kowlin)\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.0\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: fr\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: fr_FR\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr "J'ai tenté de faire quelque chose que pour lequel Discord m'a refusé les permissions. La commande a échoué."
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr "J'ai essayé de {verb} {role.name} à {member.display_name} mais ce rôle est plus élevé que mon rôle le plus élevé dans la hiérarchie Discord, je n'ai donc pas réussi à l'ajouter. Donnez-moi un rôle plus élevé et réessayez."
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr "J'ai essayé de {verb} {role.name} à {member.display_name} mais ce rôle est plus élevé que votre rôle le plus élevé dans la hiérarchie Discord donc je n'ai pas réussi à l'ajouter. Essayez à nouveau avec un rôle plus élevé."
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr "J'ai essayé d'éditer {role.name} mais ce rôle est plus élevé que votre rôle le plus élevé dans la hiérarchie Discord et je n'ai donc pas réussi à l'ajouter. Essayez à nouveau avec un rôle plus élevé."
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr "Je suis déjà en train d'annoncer quelque chose. Si tu souhaites faire une annonce différente, tu dois d'abord utiliser la commande `{prefix}announce cancel`."
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr "Un ensemble d'utilitaires d'administration du serveur."
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr "ajouter"
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr "J'ai bien ajouté le rôle {role.name} à {member.display_name}"
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr "supprimer"
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr "J'ai bien retiré le rôle {role.name} de {member.display_name}"
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr "Ajouter un rôle à un utilisateur.\\n\\n Si aucun utilisateur n'est mentionné dans la commande, celui-ci fera effet sur l'auteur.\\n "
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr "Retirer un rôle à un utilisateur.\\n\\n Si aucun utilisateur n'est mentionné dans la commande, celui-ci fera effet sur l'auteur.\\n "
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr "Modifier les paramètres d'un rôle."
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr "Modifier la couleur d'un rôle.\\n\\n Utilise des guillemets si le nom du rôle contient des espaces.\\n La couleur doit être au format hexadécimal\\n [Sélecteur de couleur en ligne](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Exemples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Fait."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr "Modifier le nom d'un rôle.\\n\\n Utilise des guillemets si le nom du rôle contient des espaces.\\n\\n Exemples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr "Faire une annonce à tous les serveurs dans lesquels le bot se trouve."
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr "Lannonce a commencé."
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr "Interrompre une annonce en cours."
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr "L'annonce actuelle a été interrompue."
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr "Changer le salon dans lequel le bot fait des annonces."
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr "Les annonces seront maintenant faites dans {channel.mention}"
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr "Activer ou désactiver les annonces sur ce serveur."
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr "Le serveur {guild.name} recevra maintenant les annonces."
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr "Le serveur {guild.name} ne recevra plus les annonces."
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr "S'ajouter un rôle à soi-même.\\n\\n Les administrateurs du serveur doivent avoir configuré le rôle en tant qu'ajoutable par les utilisateurs.\\n\\n NOTE : Le nom du rôle est sensible aux majuscules et minuscules !\\n "
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr "Se supprimer un auto-rôle.\\n\\n NOTE : Le rôle est sensible aux majuscules et minuscules !\\n "
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr "Ajouter un rôle à la liste des auto-rôles disponibles.\\n\\n NOTE : Le nom du rôle est sensible aux majuscules et minuscules !\\n "
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr "La liste des auto-rôles a été modifiée avec succès."
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr "Supprimer un rôle de la liste des auto-rôles.\\n\\n NOTE : Le nom du rôle est sensible aux majuscules et minuscules !\\n "
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr "\\n Liste de tous les auto-rôles disponibles.\\n "
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr "Auto-rôles disponibles :\\n{selfroles}"
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr "Verrouiller un bot sur ses serveurs actuels uniquement."
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr "Le bot n'est plus verrouillé sur ses serveurs actuels."
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr "Le bot est maintenant verrouillé sur ses serveurs actuels."
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr "Je n'ai pas pu faire d'annonce dans le serveur: {server.id}"
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr "Le cog Admin n'est pas chargé."
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr "Le rôle fourni n'est pas un auto-rôle valide."

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:13\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Hungarian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: hu\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: hu_HU\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr ""
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Kész."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:14\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Indonesian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: id\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: id_ID\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr ""
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr "menambahkan"
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr "menghapus"
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Selesai."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:13\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Italian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: it\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: it_IT\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr "Ho cercato di fare qualcosa ma Discord mi ha negato i permessi per farla. Il tuo comando non è stato completato con successo."
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr "Ho cercato di {verb} {role.name} al gruppo {member.display_name} ma quel ruolo è più elevato del mio livello nella gerarchia di Discord quindi non sono stato in grado di aggiungerlo. prova a darmi un ruolo più alto e riprova."
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr "Ho cercato di {verb} {role.name} al gruppo {member.display_name} ma quel ruolo è più elevato del tuo livello nella gerarchia di Discord quindi non sono stato in grado di aggiungerlo. Raggiungi un ruolo più alto e riprova."
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr "Ho cercato di modificare {role.name} ma quel ruolo è più elevato del tuo livello nella gerarchia di Discord quindi non sono stato in grado di aggiungerlo. Raggiungi un ruolo più alto e riprova."
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr "Sto già annunciando qualcosa. Se desideri fare un annuncio diverso, usa prima `{prefix}announce cancel`."
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr "Una collezione di servizi di amministrazione del server."
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr "aggiungere"
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr "Ho aggiunto con successo {role.name} al gruppo {member.display_name}"
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr "rimuovere"
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr "Ho rimosso con successo {role.name} dal gruppo {member.display_name}"
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr "Modifica impostazioni ruolo."
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Fatto."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr "Invia un annuncio a tutti i server in cui si trova il bot."
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr "L'annuncio è partito."
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr "Cancella un annuncio in corso."
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr "L'annuncio in corso è stato cancellato."
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr "Modifica il canale in cui il bot invia gli annunci."
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr "Il canale per gli annunci è stato impostato su {channel.mention}"
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr "Attiva/disattiva gli annunci in questo server."
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr "Il server {guild.name} riceverà gli annunci."
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr "Il server {guild.name} non riceverà gli annunci."
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr "La lista dei ruoli autoassegnabili e stata modificata."
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr "Blocca un bot ai suoi server attuali."
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr "Il bot non è più bloccato ai server."
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr "Il bot è bloccato ai server."
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr "Non ho potuto annunciare al server: {server.id}"
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr "Il cog Admin non è caricato."
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr "Il ruolo fornito non è un ruolo autoassegnabile valido."

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:13\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Japanese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: ja\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: ja_JP\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr "私は不和が私に権限を拒否した何かをしようとしました。コマンドを正常に完了できませんでした。"
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr ""
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:13\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Korean\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: ko\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: ko_KR\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr ""
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "다 했어요."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:14\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: LOLCAT\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: lol\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: lol_US\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr "Discord sayed I can't do sometingz. Ur command faild 2 complete."
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr ""
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -1,17 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR ORGANIZATION
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2018-02-18 14:42+AKST\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
"Generated-By: pygettext.py 1.5\n"

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:13\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Dutch\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: nl\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: nl_NL\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr "Ik probeerde iets te doen, maar Discord weigerde mij toestemming te geven. Je command is geslaagd te mislukken."
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr "Ik ben al iets aan het aankondigen. Als je iets anders wilt aankondigen, voer dan eerst deze command uit: '{prefix}announce cancel'."
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr "Een collectie van de server administratie voorzieningen."
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr "Ik heb succesvol {role.name} toegevoegd aan {member.display_name}"
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr "Ik heb succesvol {role.name} verwijderd van {member.display_name}"
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr "Rol instellingen bewerken."
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Klaar."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr "Kondig een bericht aan in alle servers."
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr "De aankondiging is begonnen."
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr "Annuleer een huidige aankondiging."
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr "De huidige aankondiging is geannuleerd."
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr "Bewerk het kanaal waar de bot aankondigingen maakt."
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr "Het aankondigingskanaal is aangepast naar {channel.mention}"
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr "Aankondigingen zijn geactiveerd in deze server."
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr "De server {guild.name} ontvangt aankondigingen."
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr "De server {guild.name} ontvangt geen aankondigingen."
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr "De selfroles lijst is succesvol aangepast."
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr "Vergrendel de bot voor alleen deze server."
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr "De bot is niet langer vergrendeld."
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr "De bot is vergrendeld."
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr "Ik kan geen bericht aankondigen in: {server.id}"
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr "De admin cog is niet geladen."
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr "De ingevulde rol is geen beschikbare selfrole."

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:13\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Norwegian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: no\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: no_NO\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr ""
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Ferdig."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:13\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Polish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: pl\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: pl_PL\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr ""
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr "Spróbowałam {verb} {role.name} na {member.display_name}, ale ta rola jest wyższa niż moja najwyższa rola w hierarchii Discorda, więc nie mogłam jej dodać. Daj mi proszę wyższą rolę i spróbuj ponownie."
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr "Spróbowałam {verb} {role.name} na {member.display_name}, ale ta rola jest wyższa niż twoja najwyższa rola w hierarchii Discorda, więc nie mogłam jej dodać. Uzyskaj proszę wyższą rolę i spróbuj ponownie."
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr "Spróbowałam zmienić {role.name}, ale ta rola jest wyższa niż twoja najwyższa rola w hierarchii Discorda, więc nie mogłam jej dodać. Uzyskaj proszę wyższą rolę i spróbuj ponownie."
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr "dodać"
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr "usunąć"
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Gotowe."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr "Moduł Admin nie jest załadowany."
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:14\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Portuguese, Brazilian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: pt-BR\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: pt_BR\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr "Eu tentei fazer algo que o Discord me negou as permissões. Seu comando falhou em ser completado com sucesso."
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr "Eu já estou anunciando algo. Se quer fazer um anúncio diferente, por favor use `{prefix}announce cancel` primeiro."
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr "Uma coleção de ferramentas de administração para o servidor."
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr "Eu adicionei com sucesso {role.name} de {member.display_name}"
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr "Eu removi com sucesso {role.name} de {member.display_name}"
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr "Edite as configurações de cargo."
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Concluído."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:13\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Portuguese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: pt-PT\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: pt_PT\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr "Tentei fazer uma coisa que o Discord negou permissão para fazer. O comando não foi concluído."
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr "Já estou a anunciar algo. Se queres fazer um anúncio diferente usa `{prefix}announce cancel` antes de usares este comando."
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr "Uma coleção de utilidades para administração de servidores."
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr "Adicionei com sucesso {role.name} a {member.display_name}"
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr "Removi com sucesso {role.name} de {member.display_name}"
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Concluído."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr "Anuncia uma mensagem para todos os servidores em que o bot está."
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr "O anúncio foi iniciado."
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr "Cancelar um anúncio em curso."
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr "O anúncio atual foi cancelado."
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr "Mude o canal para o qual o bot faz os anúncios."
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr "O canal de anúncio foi definido para {channel.mention}"
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr "Ativar ou Desativar os anúncios neste servidor."
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr "O servidor {guild.name} vai receber anúncios."
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr "O servidor {guild.name} não vai receber anúncios."
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr "A lista de cargos definíveis foi modificada com sucesso."
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr "Bloquear o bot aos servidores atuais."
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr "O bot já não está bloqueado aos servidores atuais."
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr "O bot está agora bloqueado aos servidores atuais."
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr "Não me foi possível anunciar no servidor: {server.id}"
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr "O cog 'Admin' não está carregado."
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr "O cargo indicado não é um cargo definível válido."

View File

@@ -1,15 +0,0 @@
import subprocess
TO_TRANSLATE = [
'../admin.py'
]
def regen_messages():
subprocess.run(
['pygettext', '-n'] + TO_TRANSLATE
)
if __name__ == "__main__":
regen_messages()

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-14 02:09\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Romanian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100>0 && n%100<20)) ? 1 : 2);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: ro\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: ro_RO\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr ""
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr ""
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:13\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Russian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: ru\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: ru_RU\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr "Я попыталась сделать что-то, в чем Discord отказал мне в разрешениях. Ваша команда не была выполнена успешно."
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr "Я попытался изменить {role.name}, но эта роль выше Вашей в иерархии Discord, поэтому я не смог добавить её. Повысьте роль и попробуйте еще раз."
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr "Я уже что-то объявляю. Если вы хотите сделать другое объявление, сначала используйте `{prefix}announce cancel`."
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr "Набор утилит администрирования сервера."
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr "добавить"
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr "Я успешно добавила роль {role.name} пользователю {member.display_name}"
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr "удалить"
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr "Я успешно забрала роль {role.name} у пользователя {member.display_name}"
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr "Изменение параметров роли."
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Готово."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr "Объявить сообщение на всех серверах, к которым подключен бот."
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr "Объявление началось."
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr "Отменить текущее объявление."
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr "Текущее объявление было отменено."
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr "Изменить канал, на котором бот делает объявления."
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr "Канал объявления был установлен на {channel.mention}"
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr "Переключить объявления, когда этот сервер включен."
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr "Сервер {guild.name} будет получать объявления."
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr "Сервер {guild.name} не будет получать объявления."
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr "Список ролей был изменен успешно."
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr "Зафиксировать бота только на его текущих серверах."
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr "Бот больше не зафиксирован на сервере."
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr "Бот теперь зафиксирован на сервере."
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr "Я не могу объявить на сервере: {server.id}"
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr "Модуль Admin не загружен."
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr "Предоставленная роль не является допустимой ролью."

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:14\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Slovak\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 3;\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: sk\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: sk_SK\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr ""
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr ""
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:14\n"
"Last-Translator: Robert Jansen (Kowlin)\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.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: sv-SE\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: sv_SE\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr "Jag försökte göra något som Discord nekade mig behörighet till. Ditt kommando kunde inte slutföras."
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr "En samling administrationsverktyg för servern."
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr "Redigera rollinställningar."
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Klart."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:14\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Turkish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: tr\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: tr_TR\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr ""
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "Tamamdır."
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:14\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Chinese Simplified\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: zh-CN\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: zh_CN\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr ""
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr "完成。"
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -0,0 +1,186 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-14 02:15\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Chinese Traditional\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: zh-TW\n"
"X-Crowdin-File: /cogs/admin/locales/messages.pot\n"
"Language: zh_TW\n"
#: redbot/cogs/admin/admin.py:17
msgid "I attempted to do something that Discord denied me permissions for. Your command failed to successfully complete."
msgstr ""
#: redbot/cogs/admin/admin.py:22
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than my highest role in the Discord hierarchy so I was unable to successfully add it. Please give me a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:29
msgid "I tried to {verb} {role.name} to {member.display_name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:36
msgid "I tried to edit {role.name} but that role is higher than your highest role in the Discord hierarchy so I was unable to successfully add it. Please get a higher role and try again."
msgstr ""
#: redbot/cogs/admin/admin.py:43
msgid "I am already announcing something. If you would like to make a different announcement please use `{prefix}announce cancel` first."
msgstr ""
#: redbot/cogs/admin/admin.py:53
#, docstring
msgid "A collection of server administration utilities."
msgstr ""
#: redbot/cogs/admin/admin.py:115 redbot/cogs/admin/admin.py:160
msgid "add"
msgstr ""
#: redbot/cogs/admin/admin.py:121
msgid "I successfully added {role.name} to {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:132 redbot/cogs/admin/admin.py:180
msgid "remove"
msgstr ""
#: redbot/cogs/admin/admin.py:138
msgid "I successfully removed {role.name} from {member.display_name}"
msgstr ""
#: redbot/cogs/admin/admin.py:149
#, docstring
msgid "Add a role to a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:169
#, docstring
msgid "Remove a role from a user.\\n\\n If user is left blank it defaults to the author of the command.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:187
#, docstring
msgid "Edit role settings."
msgstr ""
#: redbot/cogs/admin/admin.py:194
#, docstring
msgid "Edit a role's colour.\\n\\n Use double quotes if the role contains spaces.\\n Colour must be in hexadecimal format.\\n [Online colour picker](http://www.w3schools.com/colors/colors_picker.asp)\\n\\n Examples:\\n `[p]editrole colour \\\"The Transistor\\\" #ff0000`\\n `[p]editrole colour Test #ff9900`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:217 redbot/cogs/admin/admin.py:245
msgid "Done."
msgstr ""
#: redbot/cogs/admin/admin.py:222
#, docstring
msgid "Edit a role's name.\\n\\n Use double quotes if the role or the name contain spaces.\\n\\n Examples:\\n `[p]editrole name \\\"The Transistor\\\" Test`\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:250
#, docstring
msgid "Announce a message to all servers the bot is in."
msgstr ""
#: redbot/cogs/admin/admin.py:257
msgid "The announcement has begun."
msgstr ""
#: redbot/cogs/admin/admin.py:265
#, docstring
msgid "Cancel a running announce."
msgstr ""
#: redbot/cogs/admin/admin.py:271
msgid "The current announcement has been cancelled."
msgstr ""
#: redbot/cogs/admin/admin.py:277
#, docstring
msgid "Change the channel to which the bot makes announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:283
msgid "The announcement channel has been set to {channel.mention}"
msgstr ""
#: redbot/cogs/admin/admin.py:290
#, docstring
msgid "Toggle announcements being enabled this server."
msgstr ""
#: redbot/cogs/admin/admin.py:296
msgid "The server {guild.name} will receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:300
msgid "The server {guild.name} will not receive announcements."
msgstr ""
#: redbot/cogs/admin/admin.py:326
#, docstring
msgid "Add a role to yourself.\\n\\n Server admins must have configured the role as user settable.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:337
#, docstring
msgid "Remove a selfrole from yourself.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:347
#, docstring
msgid "Add a role to the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:355 redbot/cogs/admin/admin.py:367
msgid "The selfroles list has been successfully modified."
msgstr ""
#: redbot/cogs/admin/admin.py:360
#, docstring
msgid "Remove a role from the list of available selfroles.\\n\\n NOTE: The role is case sensitive!\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:371
#, docstring
msgid "\\n Lists all available selfroles.\\n "
msgstr ""
#: redbot/cogs/admin/admin.py:377
msgid "Available Selfroles:\\n{selfroles}"
msgstr ""
#: redbot/cogs/admin/admin.py:394
#, docstring
msgid "Lock a bot to its current servers only."
msgstr ""
#: redbot/cogs/admin/admin.py:399
msgid "The bot is no longer serverlocked."
msgstr ""
#: redbot/cogs/admin/admin.py:401
msgid "The bot is now serverlocked."
msgstr ""
#: redbot/cogs/admin/announcer.py:70
msgid "I could not announce to server: {server.id}"
msgstr ""
#: redbot/cogs/admin/converters.py:25
msgid "The Admin cog is not loaded."
msgstr ""
#: redbot/cogs/admin/converters.py:34
msgid "The provided role is not a valid selfrole."
msgstr ""

View File

@@ -1,6 +1,6 @@
from .alias import Alias
from discord.ext import commands
from redbot.core.bot import Red
def setup(bot: commands.Bot):
def setup(bot: Red):
bot.add_cog(Alias(bot))

View File

@@ -1,41 +1,53 @@
from copy import copy
from re import search
from typing import Generator, Tuple, Iterable
from re import findall, search
from string import Formatter
from typing import Generator, Tuple, Iterable, Optional
import discord
from redbot.core import Config
from redbot.core.i18n import CogI18n
from discord.ext.commands.view import StringView
from redbot.core import Config, commands, checks
from redbot.core.i18n import Translator, cog_i18n
from redbot.core.utils.chat_formatting import box
from discord.ext import commands
from redbot.core.bot import Red
from .alias_entry import AliasEntry
_ = CogI18n("Alias", __file__)
_ = Translator("Alias", __file__)
class Alias:
"""
Alias
Aliases are per server shortcuts for commands. They
can act as both a lambda (storing arguments for repeated use)
or as simply a shortcut to saying "x y z".
class _TrackingFormatter(Formatter):
def __init__(self):
super().__init__()
self.max = -1
def get_value(self, key, args, kwargs):
if isinstance(key, int):
self.max = max((key, self.max))
return super().get_value(key, args, kwargs)
class ArgParseError(Exception):
pass
@cog_i18n(_)
class Alias(commands.Cog):
"""Create aliases for commands.
Aliases are alternative names shortcuts for commands. They
can act as both a lambda (storing arguments for repeated use)
or as simply a shortcut to saying "x y z".
When run, aliases will accept any additional arguments
and append them to the stored alias
and append them to the stored alias.
"""
default_global_settings = {
"entries": []
}
default_global_settings = {"entries": []}
default_guild_settings = {
"enabled": False,
"entries": [] # Going to be a list of dicts
}
default_guild_settings = {"enabled": False, "entries": []} # Going to be a list of dicts
def __init__(self, bot: Red):
super().__init__()
self.bot = bot
self._aliases = Config.get_conf(self, 8927348724)
@@ -49,16 +61,22 @@ class Alias:
return (AliasEntry.from_json(d) for d in (await self._aliases.entries()))
async def loaded_aliases(self, guild: discord.Guild) -> Generator[AliasEntry, None, None]:
return (AliasEntry.from_json(d, bot=self.bot)
for d in (await self._aliases.guild(guild).entries()))
return (
AliasEntry.from_json(d, bot=self.bot)
for d in (await self._aliases.guild(guild).entries())
)
async def loaded_global_aliases(self) -> Generator[AliasEntry, None, None]:
return (AliasEntry.from_json(d, bot=self.bot) for d in (await self._aliases.entries()))
async def is_alias(self, guild: discord.Guild, alias_name: str,
server_aliases: Iterable[AliasEntry]=()) -> (bool, AliasEntry):
async def is_alias(
self,
guild: Optional[discord.Guild],
alias_name: str,
server_aliases: Iterable[AliasEntry] = (),
) -> Tuple[bool, Optional[AliasEntry]]:
if not server_aliases:
if not server_aliases and guild is not None:
server_aliases = await self.unloaded_aliases(guild)
global_aliases = await self.unloaded_global_aliases()
@@ -76,10 +94,28 @@ class Alias:
@staticmethod
def is_valid_alias_name(alias_name: str) -> bool:
return not bool(search(r'\s', alias_name)) and alias_name.isprintable()
return not bool(search(r"\s", alias_name)) and alias_name.isprintable()
async def add_alias(
self, ctx: commands.Context, alias_name: str, command: str, global_: bool = False
) -> AliasEntry:
indices = findall(r"{(\d*)}", command)
if indices:
try:
indices = [int(a[0]) for a in indices]
except IndexError:
raise ArgParseError(_("Arguments must be specified with a number."))
low = min(indices)
indices = [a - low for a in indices]
high = max(indices)
gaps = set(indices).symmetric_difference(range(high + 1))
if gaps:
raise ArgParseError(
_("Arguments must be sequential. Missing arguments: ")
+ ", ".join(str(i + low) for i in gaps)
)
command = command.format(*(f"{{{i}}}" for i in range(-low, high + low + 1)))
async def add_alias(self, ctx: commands.Context, alias_name: str,
command: Tuple[str], global_: bool=False) -> AliasEntry:
alias = AliasEntry(alias_name, command, ctx.author, global_=global_)
if global_:
@@ -93,8 +129,9 @@ class Alias:
return alias
async def delete_alias(self, ctx: commands.Context, alias_name: str,
global_: bool=False) -> bool:
async def delete_alias(
self, ctx: commands.Context, alias_name: str, global_: bool = False
) -> bool:
if global_:
settings = self._aliases
else:
@@ -120,16 +157,15 @@ class Alias:
"""
content = message.content
prefix_list = await self.bot.command_prefix(self.bot, message)
prefixes = sorted(prefix_list,
key=lambda pfx: len(pfx),
reverse=True)
prefixes = sorted(prefix_list, key=lambda pfx: len(pfx), reverse=True)
for p in prefixes:
if content.startswith(p):
return p
raise ValueError(_("No prefix found."))
def get_extra_args_from_alias(self, message: discord.Message, prefix: str,
alias: AliasEntry) -> str:
def get_extra_args_from_alias(
self, message: discord.Message, prefix: str, alias: AliasEntry
) -> str:
"""
When an alias is executed by a user in chat this function tries
to get any extra arguments passed in with the call.
@@ -140,175 +176,227 @@ class Alias:
:return:
"""
known_content_length = len(prefix) + len(alias.name)
extra = message.content[known_content_length:].strip()
extra = message.content[known_content_length:]
view = StringView(extra)
view.skip_ws()
extra = []
while not view.eof:
prev = view.index
word = view.get_quoted_word()
if len(word) < view.index - prev:
word = "".join((view.buffer[prev], word, view.buffer[view.index - 1]))
extra.append(word)
view.skip_ws()
return extra
async def maybe_call_alias(self, message: discord.Message,
aliases: Iterable[AliasEntry]=None):
async def maybe_call_alias(
self, message: discord.Message, aliases: Iterable[AliasEntry] = None
):
try:
prefix = await self.get_prefix(message)
except ValueError:
return
try:
potential_alias = message.content[len(prefix):].split(" ")[0]
potential_alias = message.content[len(prefix) :].split(" ")[0]
except IndexError:
return False
is_alias, alias = await self.is_alias(message.guild, potential_alias, server_aliases=aliases)
is_alias, alias = await self.is_alias(
message.guild, potential_alias, server_aliases=aliases
)
if is_alias:
await self.call_alias(message, prefix, alias)
async def call_alias(self, message: discord.Message, prefix: str,
alias: AliasEntry):
async def call_alias(self, message: discord.Message, prefix: str, alias: AliasEntry):
new_message = copy(message)
args = self.get_extra_args_from_alias(message, prefix, alias)
try:
args = self.get_extra_args_from_alias(message, prefix, alias)
except commands.BadArgument as bae:
return
trackform = _TrackingFormatter()
command = trackform.format(alias.command, *args)
# noinspection PyDunderSlots
new_message.content = "{}{} {}".format(prefix, alias.command, args)
new_message.content = "{}{} {}".format(
prefix, command, " ".join(args[trackform.max + 1 :])
)
await self.bot.process_commands(new_message)
@commands.group()
@commands.guild_only()
async def alias(self, ctx: commands.Context):
"""Manage per-server aliases for commands"""
if ctx.invoked_subcommand is None:
await ctx.send_help()
"""Manage command aliases."""
pass
@alias.group(name="global")
async def global_(self, ctx: commands.Context):
"""
Manage global aliases.
"""
if ctx.invoked_subcommand is None or \
isinstance(ctx.invoked_subcommand, commands.Group):
await ctx.send_help()
"""Manage global aliases."""
pass
@checks.mod_or_permissions(manage_guild=True)
@alias.command(name="add")
@commands.guild_only()
async def _add_alias(self, ctx: commands.Context,
alias_name: str, *, command):
"""
Add an alias for a command.
"""
# region Alias Add Validity Checking
async def _add_alias(self, ctx: commands.Context, alias_name: str, *, command):
"""Add an alias for a command."""
# region Alias Add Validity Checking
is_command = self.is_command(alias_name)
if is_command:
await ctx.send(_("You attempted to create a new alias"
" with the name {} but that"
" name is already a command on this bot.").format(alias_name))
await ctx.send(
_(
"You attempted to create a new alias"
" with the name {name} but that"
" name is already a command on this bot."
).format(name=alias_name)
)
return
is_alias, something_useless = await self.is_alias(ctx.guild, alias_name)
if is_alias:
await ctx.send(_("You attempted to create a new alias"
" with the name {} but that"
" alias already exists on this server.").format(alias_name))
await ctx.send(
_(
"You attempted to create a new alias"
" with the name {name} but that"
" alias already exists on this server."
).format(name=alias_name)
)
return
is_valid_name = self.is_valid_alias_name(alias_name)
if not is_valid_name:
await ctx.send(_("You attempted to create a new alias"
" with the name {} but that"
" name is an invalid alias name. Alias"
" names may not contain spaces.").format(alias_name))
await ctx.send(
_(
"You attempted to create a new alias"
" with the name {name} but that"
" name is an invalid alias name. Alias"
" names may not contain spaces."
).format(name=alias_name)
)
return
# endregion
# endregion
# At this point we know we need to make a new alias
# and that the alias name is valid.
await self.add_alias(ctx, alias_name, command)
try:
await self.add_alias(ctx, alias_name, command)
except ArgParseError as e:
return await ctx.send(" ".join(e.args))
await ctx.send(_("A new alias with the trigger `{}`"
" has been created.").format(alias_name))
await ctx.send(
_("A new alias with the trigger `{name}` has been created.").format(name=alias_name)
)
@checks.is_owner()
@global_.command(name="add")
async def _add_global_alias(self, ctx: commands.Context,
alias_name: str, *, command):
"""
Add a global alias for a command.
"""
# region Alias Add Validity Checking
async def _add_global_alias(self, ctx: commands.Context, alias_name: str, *, command):
"""Add a global alias for a command."""
# region Alias Add Validity Checking
is_command = self.is_command(alias_name)
if is_command:
await ctx.send(_("You attempted to create a new global alias"
" with the name {} but that"
" name is already a command on this bot.").format(alias_name))
await ctx.send(
_(
"You attempted to create a new global alias"
" with the name {name} but that"
" name is already a command on this bot."
).format(name=alias_name)
)
return
is_alias, something_useless = await self.is_alias(ctx.guild, alias_name)
if is_alias:
await ctx.send(_("You attempted to create a new global alias"
" with the name {} but that"
" alias already exists on this server.").format(alias_name))
await ctx.send(
_(
"You attempted to create a new global alias"
" with the name {name} but that"
" alias already exists on this server."
).format(name=alias_name)
)
return
is_valid_name = self.is_valid_alias_name(alias_name)
if not is_valid_name:
await ctx.send(_("You attempted to create a new global alias"
" with the name {} but that"
" name is an invalid alias name. Alias"
" names may not contain spaces.").format(alias_name))
await ctx.send(
_(
"You attempted to create a new global alias"
" with the name {name} but that"
" name is an invalid alias name. Alias"
" names may not contain spaces."
).format(name=alias_name)
)
return
# endregion
# endregion
await self.add_alias(ctx, alias_name, command, global_=True)
try:
await self.add_alias(ctx, alias_name, command, global_=True)
except ArgParseError as e:
return await ctx.send(" ".join(e.args))
await ctx.send(_("A new global alias with the trigger `{}`"
" has been created.").format(alias_name))
await ctx.send(
_("A new global alias with the trigger `{name}` has been created.").format(
name=alias_name
)
)
@alias.command(name="help")
@commands.guild_only()
async def _help_alias(self, ctx: commands.Context, alias_name: str):
"""Tries to execute help for the base command of the alias"""
is_alias, alias = self.is_alias(ctx.guild, alias_name=alias_name)
"""Try to execute help for the base command of the alias."""
is_alias, alias = await self.is_alias(ctx.guild, alias_name=alias_name)
if is_alias:
base_cmd = alias.command[0]
if self.is_command(alias.command):
base_cmd = alias.command
else:
base_cmd = alias.command.rsplit(" ", 1)[0]
new_msg = copy(ctx.message)
new_msg.content = "{}help {}".format(ctx.prefix, base_cmd)
new_msg.content = _("{prefix}help {command}").format(
prefix=ctx.prefix, command=base_cmd
)
await self.bot.process_commands(new_msg)
else:
ctx.send(_("No such alias exists."))
await ctx.send(_("No such alias exists."))
@alias.command(name="show")
@commands.guild_only()
async def _show_alias(self, ctx: commands.Context, alias_name: str):
"""Shows what command the alias executes."""
"""Show what command the alias executes."""
is_alias, alias = await self.is_alias(ctx.guild, alias_name)
if is_alias:
await ctx.send(_("The `{}` alias will execute the"
" command `{}`").format(alias_name, alias.command))
await ctx.send(
_("The `{alias_name}` alias will execute the command `{command}`").format(
alias_name=alias_name, command=alias.command
)
)
else:
await ctx.send(_("There is no alias with the name `{}`").format(alias_name))
await ctx.send(_("There is no alias with the name `{name}`").format(name=alias_name))
@alias.command(name="del")
@checks.mod_or_permissions(manage_guild=True)
@alias.command(name="delete", aliases=["del", "remove"])
@commands.guild_only()
async def _del_alias(self, ctx: commands.Context, alias_name: str):
"""
Deletes an existing alias on this server.
"""
"""Delete an existing alias on this server."""
aliases = await self.unloaded_aliases(ctx.guild)
try:
next(aliases)
except StopIteration:
await ctx.send(_("There are no aliases on this guild."))
await ctx.send(_("There are no aliases on this server."))
return
if await self.delete_alias(ctx, alias_name):
await ctx.send(_("Alias with the name `{}` was successfully"
" deleted.").format(alias_name))
await ctx.send(
_("Alias with the name `{name}` was successfully deleted.").format(name=alias_name)
)
else:
await ctx.send(_("Alias with name `{}` was not found.").format(alias_name))
await ctx.send(_("Alias with name `{name}` was not found.").format(name=alias_name))
@global_.command(name="del")
@checks.is_owner()
@global_.command(name="delete", aliases=["del", "remove"])
async def _del_global_alias(self, ctx: commands.Context, alias_name: str):
"""
Deletes an existing global alias.
"""
"""Delete an existing global alias."""
aliases = await self.unloaded_global_aliases()
try:
next(aliases)
@@ -317,18 +405,19 @@ class Alias:
return
if await self.delete_alias(ctx, alias_name, global_=True):
await ctx.send(_("Alias with the name `{}` was successfully"
" deleted.").format(alias_name))
await ctx.send(
_("Alias with the name `{name}` was successfully deleted.").format(name=alias_name)
)
else:
await ctx.send(_("Alias with name `{}` was not found.").format(alias_name))
await ctx.send(_("Alias with name `{name}` was not found.").format(name=alias_name))
@alias.command(name="list")
@commands.guild_only()
async def _list_alias(self, ctx: commands.Context):
"""
Lists the available aliases on this server.
"""
names = [_("Aliases:"), ] + sorted(["+ " + a.name for a in (await self.unloaded_aliases(ctx.guild))])
"""List the available aliases on this server."""
names = [_("Aliases:")] + sorted(
["+ " + a.name for a in (await self.unloaded_aliases(ctx.guild))]
)
if len(names) == 0:
await ctx.send(_("There are no aliases on this server."))
else:
@@ -336,15 +425,16 @@ class Alias:
@global_.command(name="list")
async def _list_global_alias(self, ctx: commands.Context):
"""
Lists the available global aliases on this bot.
"""
names = [_("Aliases:"), ] + sorted(["+ " + a.name for a in await self.unloaded_global_aliases()])
"""List the available global aliases on this bot."""
names = [_("Aliases:")] + sorted(
["+ " + a.name for a in await self.unloaded_global_aliases()]
)
if len(names) == 0:
await ctx.send(_("There are no aliases on this server."))
else:
await ctx.send(box("\n".join(names), "diff"))
@commands.Cog.listener()
async def on_message(self, message: discord.Message):
aliases = list(await self.unloaded_global_aliases())
if message.guild is not None:

View File

@@ -1,12 +1,13 @@
from typing import Tuple
from discord.ext import commands
import discord
from redbot.core import commands
class AliasEntry:
def __init__(self, name: str, command: Tuple[str],
creator: discord.Member, global_: bool=False):
def __init__(
self, name: str, command: Tuple[str], creator: discord.Member, global_: bool = False
):
super().__init__()
self.has_real_data = False
self.name = name
@@ -43,13 +44,12 @@ class AliasEntry:
"creator": creator,
"guild": guild,
"global": self.global_,
"uses": self.uses
"uses": self.uses,
}
@classmethod
def from_json(cls, data: dict, bot: commands.Bot=None):
ret = cls(data["name"], data["command"],
data["creator"], global_=data["global"])
def from_json(cls, data: dict, bot: commands.Bot = None):
ret = cls(data["name"], data["command"], data["creator"], global_=data["global"])
if bot:
ret.has_real_data = True

View File

@@ -0,0 +1,154 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:12\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Arabic\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: ar\n"
"X-Crowdin-File: /cogs/alias/locales/messages.pot\n"
"Language: ar_SA\n"
#: redbot/cogs/alias/alias.py:35
#, docstring
msgid "Create aliases for commands.\\n\\n Aliases are alternative names shortcuts for commands. They\\n can act as both a lambda (storing arguments for repeated use)\\n or as simply a shortcut to saying \\\"x y z\\\".\\n\\n When run, aliases will accept any additional arguments\\n and append them to the stored alias.\\n "
msgstr ""
#: redbot/cogs/alias/alias.py:107
msgid "Arguments must be specified with a number."
msgstr ""
#: redbot/cogs/alias/alias.py:114
msgid "Arguments must be sequential. Missing arguments: "
msgstr ""
#: redbot/cogs/alias/alias.py:164
msgid "No prefix found."
msgstr ""
#: redbot/cogs/alias/alias.py:231
#, docstring
msgid "Manage command aliases."
msgstr ""
#: redbot/cogs/alias/alias.py:236
#, docstring
msgid "Manage global aliases."
msgstr ""
#: redbot/cogs/alias/alias.py:243
#, docstring
msgid "Add an alias for a command."
msgstr ""
#: redbot/cogs/alias/alias.py:248
msgid "You attempted to create a new alias with the name {name} but that name is already a command on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:259
msgid "You attempted to create a new alias with the name {name} but that alias already exists on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:270
msgid "You attempted to create a new alias with the name {name} but that name is an invalid alias name. Alias names may not contain spaces."
msgstr ""
#: redbot/cogs/alias/alias.py:289
msgid "A new alias with the trigger `{name}` has been created."
msgstr ""
#: redbot/cogs/alias/alias.py:295
#, docstring
msgid "Add a global alias for a command."
msgstr ""
#: redbot/cogs/alias/alias.py:300
msgid "You attempted to create a new global alias with the name {name} but that name is already a command on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:311
msgid "You attempted to create a new global alias with the name {name} but that alias already exists on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:322
msgid "You attempted to create a new global alias with the name {name} but that name is an invalid alias name. Alias names may not contain spaces."
msgstr ""
#: redbot/cogs/alias/alias.py:338
msgid "A new global alias with the trigger `{name}` has been created."
msgstr ""
#: redbot/cogs/alias/alias.py:346
#, docstring
msgid "Try to execute help for the base command of the alias."
msgstr ""
#: redbot/cogs/alias/alias.py:355
msgid "{prefix}help {command}"
msgstr ""
#: redbot/cogs/alias/alias.py:360
msgid "No such alias exists."
msgstr ""
#: redbot/cogs/alias/alias.py:365
#, docstring
msgid "Show what command the alias executes."
msgstr ""
#: redbot/cogs/alias/alias.py:370
msgid "The `{alias_name}` alias will execute the command `{command}`"
msgstr ""
#: redbot/cogs/alias/alias.py:375
msgid "There is no alias with the name `{name}`"
msgstr ""
#: redbot/cogs/alias/alias.py:381
#, docstring
msgid "Delete an existing alias on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:386 redbot/cogs/alias/alias.py:422
#: redbot/cogs/alias/alias.py:433
msgid "There are no aliases on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:391 redbot/cogs/alias/alias.py:409
msgid "Alias with the name `{name}` was successfully deleted."
msgstr ""
#: redbot/cogs/alias/alias.py:394 redbot/cogs/alias/alias.py:412
msgid "Alias with name `{name}` was not found."
msgstr ""
#: redbot/cogs/alias/alias.py:399
#, docstring
msgid "Delete an existing global alias."
msgstr ""
#: redbot/cogs/alias/alias.py:404
msgid "There are no aliases on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:417
#, docstring
msgid "List the available aliases on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:418 redbot/cogs/alias/alias.py:429
msgid "Aliases:"
msgstr ""
#: redbot/cogs/alias/alias.py:428
#, docstring
msgid "List the available global aliases on this bot."
msgstr ""

View File

@@ -0,0 +1,154 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:12\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Bulgarian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: bg\n"
"X-Crowdin-File: /cogs/alias/locales/messages.pot\n"
"Language: bg_BG\n"
#: redbot/cogs/alias/alias.py:35
#, docstring
msgid "Create aliases for commands.\\n\\n Aliases are alternative names shortcuts for commands. They\\n can act as both a lambda (storing arguments for repeated use)\\n or as simply a shortcut to saying \\\"x y z\\\".\\n\\n When run, aliases will accept any additional arguments\\n and append them to the stored alias.\\n "
msgstr ""
#: redbot/cogs/alias/alias.py:107
msgid "Arguments must be specified with a number."
msgstr ""
#: redbot/cogs/alias/alias.py:114
msgid "Arguments must be sequential. Missing arguments: "
msgstr ""
#: redbot/cogs/alias/alias.py:164
msgid "No prefix found."
msgstr "Няма намерен префикс."
#: redbot/cogs/alias/alias.py:231
#, docstring
msgid "Manage command aliases."
msgstr ""
#: redbot/cogs/alias/alias.py:236
#, docstring
msgid "Manage global aliases."
msgstr ""
#: redbot/cogs/alias/alias.py:243
#, docstring
msgid "Add an alias for a command."
msgstr ""
#: redbot/cogs/alias/alias.py:248
msgid "You attempted to create a new alias with the name {name} but that name is already a command on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:259
msgid "You attempted to create a new alias with the name {name} but that alias already exists on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:270
msgid "You attempted to create a new alias with the name {name} but that name is an invalid alias name. Alias names may not contain spaces."
msgstr ""
#: redbot/cogs/alias/alias.py:289
msgid "A new alias with the trigger `{name}` has been created."
msgstr ""
#: redbot/cogs/alias/alias.py:295
#, docstring
msgid "Add a global alias for a command."
msgstr ""
#: redbot/cogs/alias/alias.py:300
msgid "You attempted to create a new global alias with the name {name} but that name is already a command on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:311
msgid "You attempted to create a new global alias with the name {name} but that alias already exists on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:322
msgid "You attempted to create a new global alias with the name {name} but that name is an invalid alias name. Alias names may not contain spaces."
msgstr ""
#: redbot/cogs/alias/alias.py:338
msgid "A new global alias with the trigger `{name}` has been created."
msgstr ""
#: redbot/cogs/alias/alias.py:346
#, docstring
msgid "Try to execute help for the base command of the alias."
msgstr ""
#: redbot/cogs/alias/alias.py:355
msgid "{prefix}help {command}"
msgstr ""
#: redbot/cogs/alias/alias.py:360
msgid "No such alias exists."
msgstr "Този псевдоним не съществува."
#: redbot/cogs/alias/alias.py:365
#, docstring
msgid "Show what command the alias executes."
msgstr ""
#: redbot/cogs/alias/alias.py:370
msgid "The `{alias_name}` alias will execute the command `{command}`"
msgstr ""
#: redbot/cogs/alias/alias.py:375
msgid "There is no alias with the name `{name}`"
msgstr ""
#: redbot/cogs/alias/alias.py:381
#, docstring
msgid "Delete an existing alias on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:386 redbot/cogs/alias/alias.py:422
#: redbot/cogs/alias/alias.py:433
msgid "There are no aliases on this server."
msgstr "Няма използвани псевдоними на този сървър."
#: redbot/cogs/alias/alias.py:391 redbot/cogs/alias/alias.py:409
msgid "Alias with the name `{name}` was successfully deleted."
msgstr ""
#: redbot/cogs/alias/alias.py:394 redbot/cogs/alias/alias.py:412
msgid "Alias with name `{name}` was not found."
msgstr ""
#: redbot/cogs/alias/alias.py:399
#, docstring
msgid "Delete an existing global alias."
msgstr ""
#: redbot/cogs/alias/alias.py:404
msgid "There are no aliases on this bot."
msgstr "Няма псевдоними положени към този бот."
#: redbot/cogs/alias/alias.py:417
#, docstring
msgid "List the available aliases on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:418 redbot/cogs/alias/alias.py:429
msgid "Aliases:"
msgstr "Псевдоними:"
#: redbot/cogs/alias/alias.py:428
#, docstring
msgid "List the available global aliases on this bot."
msgstr ""

View File

@@ -0,0 +1,154 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-14 02:15\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Czech\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 3;\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: cs\n"
"X-Crowdin-File: /cogs/alias/locales/messages.pot\n"
"Language: cs_CZ\n"
#: redbot/cogs/alias/alias.py:35
#, docstring
msgid "Create aliases for commands.\\n\\n Aliases are alternative names shortcuts for commands. They\\n can act as both a lambda (storing arguments for repeated use)\\n or as simply a shortcut to saying \\\"x y z\\\".\\n\\n When run, aliases will accept any additional arguments\\n and append them to the stored alias.\\n "
msgstr "Vytvořit aliasy pro příkazy n n Aliasy jsou alternativní zkratky pro příkazy. Mohou působit jako lambda (ukládání argumentů pro opakované použití) n nebo jednoduše jako zkratka pro vyslovení \"xyz\" n n Při spuštění budou aliasy přijímat další argumenty a připojovat je k uložený alias. \\ t "
#: redbot/cogs/alias/alias.py:107
msgid "Arguments must be specified with a number."
msgstr "Argumenty musí být zadány s číslem."
#: redbot/cogs/alias/alias.py:114
msgid "Arguments must be sequential. Missing arguments: "
msgstr "Argumenty musí být sekvenční. Chybějící argumenty: "
#: redbot/cogs/alias/alias.py:164
msgid "No prefix found."
msgstr "Nebyl nalezen žádný prefix."
#: redbot/cogs/alias/alias.py:231
#, docstring
msgid "Manage command aliases."
msgstr "Spravovat aliasy příkazů."
#: redbot/cogs/alias/alias.py:236
#, docstring
msgid "Manage global aliases."
msgstr ""
#: redbot/cogs/alias/alias.py:243
#, docstring
msgid "Add an alias for a command."
msgstr ""
#: redbot/cogs/alias/alias.py:248
msgid "You attempted to create a new alias with the name {name} but that name is already a command on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:259
msgid "You attempted to create a new alias with the name {name} but that alias already exists on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:270
msgid "You attempted to create a new alias with the name {name} but that name is an invalid alias name. Alias names may not contain spaces."
msgstr ""
#: redbot/cogs/alias/alias.py:289
msgid "A new alias with the trigger `{name}` has been created."
msgstr ""
#: redbot/cogs/alias/alias.py:295
#, docstring
msgid "Add a global alias for a command."
msgstr ""
#: redbot/cogs/alias/alias.py:300
msgid "You attempted to create a new global alias with the name {name} but that name is already a command on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:311
msgid "You attempted to create a new global alias with the name {name} but that alias already exists on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:322
msgid "You attempted to create a new global alias with the name {name} but that name is an invalid alias name. Alias names may not contain spaces."
msgstr ""
#: redbot/cogs/alias/alias.py:338
msgid "A new global alias with the trigger `{name}` has been created."
msgstr ""
#: redbot/cogs/alias/alias.py:346
#, docstring
msgid "Try to execute help for the base command of the alias."
msgstr ""
#: redbot/cogs/alias/alias.py:355
msgid "{prefix}help {command}"
msgstr ""
#: redbot/cogs/alias/alias.py:360
msgid "No such alias exists."
msgstr ""
#: redbot/cogs/alias/alias.py:365
#, docstring
msgid "Show what command the alias executes."
msgstr ""
#: redbot/cogs/alias/alias.py:370
msgid "The `{alias_name}` alias will execute the command `{command}`"
msgstr ""
#: redbot/cogs/alias/alias.py:375
msgid "There is no alias with the name `{name}`"
msgstr ""
#: redbot/cogs/alias/alias.py:381
#, docstring
msgid "Delete an existing alias on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:386 redbot/cogs/alias/alias.py:422
#: redbot/cogs/alias/alias.py:433
msgid "There are no aliases on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:391 redbot/cogs/alias/alias.py:409
msgid "Alias with the name `{name}` was successfully deleted."
msgstr ""
#: redbot/cogs/alias/alias.py:394 redbot/cogs/alias/alias.py:412
msgid "Alias with name `{name}` was not found."
msgstr ""
#: redbot/cogs/alias/alias.py:399
#, docstring
msgid "Delete an existing global alias."
msgstr ""
#: redbot/cogs/alias/alias.py:404
msgid "There are no aliases on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:417
#, docstring
msgid "List the available aliases on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:418 redbot/cogs/alias/alias.py:429
msgid "Aliases:"
msgstr ""
#: redbot/cogs/alias/alias.py:428
#, docstring
msgid "List the available global aliases on this bot."
msgstr ""

View File

@@ -0,0 +1,154 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:12\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Danish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: da\n"
"X-Crowdin-File: /cogs/alias/locales/messages.pot\n"
"Language: da_DK\n"
#: redbot/cogs/alias/alias.py:35
#, docstring
msgid "Create aliases for commands.\\n\\n Aliases are alternative names shortcuts for commands. They\\n can act as both a lambda (storing arguments for repeated use)\\n or as simply a shortcut to saying \\\"x y z\\\".\\n\\n When run, aliases will accept any additional arguments\\n and append them to the stored alias.\\n "
msgstr ""
#: redbot/cogs/alias/alias.py:107
msgid "Arguments must be specified with a number."
msgstr ""
#: redbot/cogs/alias/alias.py:114
msgid "Arguments must be sequential. Missing arguments: "
msgstr ""
#: redbot/cogs/alias/alias.py:164
msgid "No prefix found."
msgstr ""
#: redbot/cogs/alias/alias.py:231
#, docstring
msgid "Manage command aliases."
msgstr ""
#: redbot/cogs/alias/alias.py:236
#, docstring
msgid "Manage global aliases."
msgstr ""
#: redbot/cogs/alias/alias.py:243
#, docstring
msgid "Add an alias for a command."
msgstr ""
#: redbot/cogs/alias/alias.py:248
msgid "You attempted to create a new alias with the name {name} but that name is already a command on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:259
msgid "You attempted to create a new alias with the name {name} but that alias already exists on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:270
msgid "You attempted to create a new alias with the name {name} but that name is an invalid alias name. Alias names may not contain spaces."
msgstr ""
#: redbot/cogs/alias/alias.py:289
msgid "A new alias with the trigger `{name}` has been created."
msgstr ""
#: redbot/cogs/alias/alias.py:295
#, docstring
msgid "Add a global alias for a command."
msgstr ""
#: redbot/cogs/alias/alias.py:300
msgid "You attempted to create a new global alias with the name {name} but that name is already a command on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:311
msgid "You attempted to create a new global alias with the name {name} but that alias already exists on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:322
msgid "You attempted to create a new global alias with the name {name} but that name is an invalid alias name. Alias names may not contain spaces."
msgstr ""
#: redbot/cogs/alias/alias.py:338
msgid "A new global alias with the trigger `{name}` has been created."
msgstr ""
#: redbot/cogs/alias/alias.py:346
#, docstring
msgid "Try to execute help for the base command of the alias."
msgstr ""
#: redbot/cogs/alias/alias.py:355
msgid "{prefix}help {command}"
msgstr ""
#: redbot/cogs/alias/alias.py:360
msgid "No such alias exists."
msgstr ""
#: redbot/cogs/alias/alias.py:365
#, docstring
msgid "Show what command the alias executes."
msgstr ""
#: redbot/cogs/alias/alias.py:370
msgid "The `{alias_name}` alias will execute the command `{command}`"
msgstr ""
#: redbot/cogs/alias/alias.py:375
msgid "There is no alias with the name `{name}`"
msgstr ""
#: redbot/cogs/alias/alias.py:381
#, docstring
msgid "Delete an existing alias on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:386 redbot/cogs/alias/alias.py:422
#: redbot/cogs/alias/alias.py:433
msgid "There are no aliases on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:391 redbot/cogs/alias/alias.py:409
msgid "Alias with the name `{name}` was successfully deleted."
msgstr ""
#: redbot/cogs/alias/alias.py:394 redbot/cogs/alias/alias.py:412
msgid "Alias with name `{name}` was not found."
msgstr ""
#: redbot/cogs/alias/alias.py:399
#, docstring
msgid "Delete an existing global alias."
msgstr ""
#: redbot/cogs/alias/alias.py:404
msgid "There are no aliases on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:417
#, docstring
msgid "List the available aliases on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:418 redbot/cogs/alias/alias.py:429
msgid "Aliases:"
msgstr ""
#: redbot/cogs/alias/alias.py:428
#, docstring
msgid "List the available global aliases on this bot."
msgstr ""

View File

@@ -0,0 +1,154 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:12\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: de\n"
"X-Crowdin-File: /cogs/alias/locales/messages.pot\n"
"Language: de_DE\n"
#: redbot/cogs/alias/alias.py:35
#, docstring
msgid "Create aliases for commands.\\n\\n Aliases are alternative names shortcuts for commands. They\\n can act as both a lambda (storing arguments for repeated use)\\n or as simply a shortcut to saying \\\"x y z\\\".\\n\\n When run, aliases will accept any additional arguments\\n and append them to the stored alias.\\n "
msgstr ""
#: redbot/cogs/alias/alias.py:107
msgid "Arguments must be specified with a number."
msgstr "Argumente müssen mit einer Nummer bestimmt werden."
#: redbot/cogs/alias/alias.py:114
msgid "Arguments must be sequential. Missing arguments: "
msgstr "Argumente müssen sequentiell sein. Fehlende Argumente: "
#: redbot/cogs/alias/alias.py:164
msgid "No prefix found."
msgstr "Kein Präfix wurde gefunden."
#: redbot/cogs/alias/alias.py:231
#, docstring
msgid "Manage command aliases."
msgstr "Verwalte die Alias Befehle."
#: redbot/cogs/alias/alias.py:236
#, docstring
msgid "Manage global aliases."
msgstr "Verwalte die globalen Aliasse."
#: redbot/cogs/alias/alias.py:243
#, docstring
msgid "Add an alias for a command."
msgstr "Füge einen Alias für einen Befehl hinzu."
#: redbot/cogs/alias/alias.py:248
msgid "You attempted to create a new alias with the name {name} but that name is already a command on this bot."
msgstr "Du hast versucht, einen neuen Alias mit dem Namen {name} zu erstellen, aber dieser Name ist bereits ein Befehl für diesen Bot."
#: redbot/cogs/alias/alias.py:259
msgid "You attempted to create a new alias with the name {name} but that alias already exists on this server."
msgstr "Du hast versucht einen neuen Alias mit dem Namen {name} zu erstellen, aber dieser Alias existiert bereits auf dem Server."
#: redbot/cogs/alias/alias.py:270
msgid "You attempted to create a new alias with the name {name} but that name is an invalid alias name. Alias names may not contain spaces."
msgstr "Du hast versucht einen neuen Alias mit dem Namen {name} zu erstellen, aber dieser Name ist ein ungültiger Alias-Name. Alias-Namen dürfen keine Leerzeichen enthalten."
#: redbot/cogs/alias/alias.py:289
msgid "A new alias with the trigger `{name}` has been created."
msgstr "Ein neuer alias mit dem Trigger `{name}` wurde erstellt."
#: redbot/cogs/alias/alias.py:295
#, docstring
msgid "Add a global alias for a command."
msgstr "Füge einen globalen Alias für einen Befehl hinzu."
#: redbot/cogs/alias/alias.py:300
msgid "You attempted to create a new global alias with the name {name} but that name is already a command on this bot."
msgstr "Du hast versucht, einen neuen globalen Alias mit dem Namen {name} zu erstellen, aber dieser Name ist bereits ein Befehl für diesen Bot."
#: redbot/cogs/alias/alias.py:311
msgid "You attempted to create a new global alias with the name {name} but that alias already exists on this server."
msgstr "Du hast versucht, einen neuen globalen Alias mit dem Namen {name} zu erstellen, dieser ist jedoch bereits auf diesem Server vorhanden."
#: redbot/cogs/alias/alias.py:322
msgid "You attempted to create a new global alias with the name {name} but that name is an invalid alias name. Alias names may not contain spaces."
msgstr "Du hast versucht, einen neuen globalen Alias mit dem Namen {name} zu erstellen, dieser Name ist jedoch ein ungültiger Alias-Name. Alias-Namen dürfen keine Leerzeichen enthalten."
#: redbot/cogs/alias/alias.py:338
msgid "A new global alias with the trigger `{name}` has been created."
msgstr "Ein neuer globaler Alias mit dem Trigger `{name}` wurde erstellt."
#: redbot/cogs/alias/alias.py:346
#, docstring
msgid "Try to execute help for the base command of the alias."
msgstr "Versuche die Hilfe für den Basisbefehl des Alias auszuführen."
#: redbot/cogs/alias/alias.py:355
msgid "{prefix}help {command}"
msgstr "{prefix}help {command}"
#: redbot/cogs/alias/alias.py:360
msgid "No such alias exists."
msgstr "So ein Alias ist nicht vorhanden."
#: redbot/cogs/alias/alias.py:365
#, docstring
msgid "Show what command the alias executes."
msgstr "Zeige den Befehl, welchen der Alias ausführt."
#: redbot/cogs/alias/alias.py:370
msgid "The `{alias_name}` alias will execute the command `{command}`"
msgstr "Der Alias '{alias_name}' führt den Befehl '{command}' aus"
#: redbot/cogs/alias/alias.py:375
msgid "There is no alias with the name `{name}`"
msgstr "Kein Alias mit dem Namen '{name}' gefunden"
#: redbot/cogs/alias/alias.py:381
#, docstring
msgid "Delete an existing alias on this server."
msgstr "Lösche einen bereits existierenden Alias auf diesem Server."
#: redbot/cogs/alias/alias.py:386 redbot/cogs/alias/alias.py:422
#: redbot/cogs/alias/alias.py:433
msgid "There are no aliases on this server."
msgstr "Es gibt keine Aliasse auf diesem Server."
#: redbot/cogs/alias/alias.py:391 redbot/cogs/alias/alias.py:409
msgid "Alias with the name `{name}` was successfully deleted."
msgstr "Der Alias mit dem Namen '{name}' wurde erfolgreich gelöscht."
#: redbot/cogs/alias/alias.py:394 redbot/cogs/alias/alias.py:412
msgid "Alias with name `{name}` was not found."
msgstr "Kein Alias mit dem Namen '{name}' gefunden."
#: redbot/cogs/alias/alias.py:399
#, docstring
msgid "Delete an existing global alias."
msgstr "Lösche einen bereits existierenden globalen Alias."
#: redbot/cogs/alias/alias.py:404
msgid "There are no aliases on this bot."
msgstr "Es gibt keine Aliasse in diesem Bot."
#: redbot/cogs/alias/alias.py:417
#, docstring
msgid "List the available aliases on this server."
msgstr "Zeige die auf diesem Server verfügbaren Alias."
#: redbot/cogs/alias/alias.py:418 redbot/cogs/alias/alias.py:429
msgid "Aliases:"
msgstr "Aliasse:"
#: redbot/cogs/alias/alias.py:428
#, docstring
msgid "List the available global aliases on this bot."
msgstr "Zeige die verfügbaren globalen Alias von diesem Bot."

View File

@@ -0,0 +1,154 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-06 16:12\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Greek\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: el\n"
"X-Crowdin-File: /cogs/alias/locales/messages.pot\n"
"Language: el_GR\n"
#: redbot/cogs/alias/alias.py:35
#, docstring
msgid "Create aliases for commands.\\n\\n Aliases are alternative names shortcuts for commands. They\\n can act as both a lambda (storing arguments for repeated use)\\n or as simply a shortcut to saying \\\"x y z\\\".\\n\\n When run, aliases will accept any additional arguments\\n and append them to the stored alias.\\n "
msgstr ""
#: redbot/cogs/alias/alias.py:107
msgid "Arguments must be specified with a number."
msgstr ""
#: redbot/cogs/alias/alias.py:114
msgid "Arguments must be sequential. Missing arguments: "
msgstr ""
#: redbot/cogs/alias/alias.py:164
msgid "No prefix found."
msgstr "Δεν βρέθηκε πρόθεμα."
#: redbot/cogs/alias/alias.py:231
#, docstring
msgid "Manage command aliases."
msgstr ""
#: redbot/cogs/alias/alias.py:236
#, docstring
msgid "Manage global aliases."
msgstr ""
#: redbot/cogs/alias/alias.py:243
#, docstring
msgid "Add an alias for a command."
msgstr ""
#: redbot/cogs/alias/alias.py:248
msgid "You attempted to create a new alias with the name {name} but that name is already a command on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:259
msgid "You attempted to create a new alias with the name {name} but that alias already exists on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:270
msgid "You attempted to create a new alias with the name {name} but that name is an invalid alias name. Alias names may not contain spaces."
msgstr ""
#: redbot/cogs/alias/alias.py:289
msgid "A new alias with the trigger `{name}` has been created."
msgstr ""
#: redbot/cogs/alias/alias.py:295
#, docstring
msgid "Add a global alias for a command."
msgstr ""
#: redbot/cogs/alias/alias.py:300
msgid "You attempted to create a new global alias with the name {name} but that name is already a command on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:311
msgid "You attempted to create a new global alias with the name {name} but that alias already exists on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:322
msgid "You attempted to create a new global alias with the name {name} but that name is an invalid alias name. Alias names may not contain spaces."
msgstr ""
#: redbot/cogs/alias/alias.py:338
msgid "A new global alias with the trigger `{name}` has been created."
msgstr ""
#: redbot/cogs/alias/alias.py:346
#, docstring
msgid "Try to execute help for the base command of the alias."
msgstr ""
#: redbot/cogs/alias/alias.py:355
msgid "{prefix}help {command}"
msgstr ""
#: redbot/cogs/alias/alias.py:360
msgid "No such alias exists."
msgstr ""
#: redbot/cogs/alias/alias.py:365
#, docstring
msgid "Show what command the alias executes."
msgstr ""
#: redbot/cogs/alias/alias.py:370
msgid "The `{alias_name}` alias will execute the command `{command}`"
msgstr ""
#: redbot/cogs/alias/alias.py:375
msgid "There is no alias with the name `{name}`"
msgstr ""
#: redbot/cogs/alias/alias.py:381
#, docstring
msgid "Delete an existing alias on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:386 redbot/cogs/alias/alias.py:422
#: redbot/cogs/alias/alias.py:433
msgid "There are no aliases on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:391 redbot/cogs/alias/alias.py:409
msgid "Alias with the name `{name}` was successfully deleted."
msgstr ""
#: redbot/cogs/alias/alias.py:394 redbot/cogs/alias/alias.py:412
msgid "Alias with name `{name}` was not found."
msgstr ""
#: redbot/cogs/alias/alias.py:399
#, docstring
msgid "Delete an existing global alias."
msgstr ""
#: redbot/cogs/alias/alias.py:404
msgid "There are no aliases on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:417
#, docstring
msgid "List the available aliases on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:418 redbot/cogs/alias/alias.py:429
msgid "Aliases:"
msgstr ""
#: redbot/cogs/alias/alias.py:428
#, docstring
msgid "List the available global aliases on this bot."
msgstr ""

View File

@@ -0,0 +1,154 @@
msgid ""
msgstr ""
"Project-Id-Version: red-discordbot\n"
"POT-Creation-Date: 2019-07-05 22:33+0200\n"
"PO-Revision-Date: 2019-07-14 02:15\n"
"Last-Translator: Robert Jansen (Kowlin)\n"
"Language-Team: Pirate English\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: redgettext 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: crowdin.com\n"
"X-Crowdin-Project: red-discordbot\n"
"X-Crowdin-Language: en-PT\n"
"X-Crowdin-File: /cogs/alias/locales/messages.pot\n"
"Language: en_PT\n"
#: redbot/cogs/alias/alias.py:35
#, docstring
msgid "Create aliases for commands.\\n\\n Aliases are alternative names shortcuts for commands. They\\n can act as both a lambda (storing arguments for repeated use)\\n or as simply a shortcut to saying \\\"x y z\\\".\\n\\n When run, aliases will accept any additional arguments\\n and append them to the stored alias.\\n "
msgstr ""
#: redbot/cogs/alias/alias.py:107
msgid "Arguments must be specified with a number."
msgstr ""
#: redbot/cogs/alias/alias.py:114
msgid "Arguments must be sequential. Missing arguments: "
msgstr ""
#: redbot/cogs/alias/alias.py:164
msgid "No prefix found."
msgstr "Arrr, no prefix found capt'n!"
#: redbot/cogs/alias/alias.py:231
#, docstring
msgid "Manage command aliases."
msgstr ""
#: redbot/cogs/alias/alias.py:236
#, docstring
msgid "Manage global aliases."
msgstr ""
#: redbot/cogs/alias/alias.py:243
#, docstring
msgid "Add an alias for a command."
msgstr ""
#: redbot/cogs/alias/alias.py:248
msgid "You attempted to create a new alias with the name {name} but that name is already a command on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:259
msgid "You attempted to create a new alias with the name {name} but that alias already exists on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:270
msgid "You attempted to create a new alias with the name {name} but that name is an invalid alias name. Alias names may not contain spaces."
msgstr ""
#: redbot/cogs/alias/alias.py:289
msgid "A new alias with the trigger `{name}` has been created."
msgstr ""
#: redbot/cogs/alias/alias.py:295
#, docstring
msgid "Add a global alias for a command."
msgstr ""
#: redbot/cogs/alias/alias.py:300
msgid "You attempted to create a new global alias with the name {name} but that name is already a command on this bot."
msgstr ""
#: redbot/cogs/alias/alias.py:311
msgid "You attempted to create a new global alias with the name {name} but that alias already exists on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:322
msgid "You attempted to create a new global alias with the name {name} but that name is an invalid alias name. Alias names may not contain spaces."
msgstr ""
#: redbot/cogs/alias/alias.py:338
msgid "A new global alias with the trigger `{name}` has been created."
msgstr ""
#: redbot/cogs/alias/alias.py:346
#, docstring
msgid "Try to execute help for the base command of the alias."
msgstr ""
#: redbot/cogs/alias/alias.py:355
msgid "{prefix}help {command}"
msgstr ""
#: redbot/cogs/alias/alias.py:360
msgid "No such alias exists."
msgstr "Yer scummy alias don't exist, matey!"
#: redbot/cogs/alias/alias.py:365
#, docstring
msgid "Show what command the alias executes."
msgstr ""
#: redbot/cogs/alias/alias.py:370
msgid "The `{alias_name}` alias will execute the command `{command}`"
msgstr ""
#: redbot/cogs/alias/alias.py:375
msgid "There is no alias with the name `{name}`"
msgstr ""
#: redbot/cogs/alias/alias.py:381
#, docstring
msgid "Delete an existing alias on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:386 redbot/cogs/alias/alias.py:422
#: redbot/cogs/alias/alias.py:433
msgid "There are no aliases on this server."
msgstr "Alas! Thar be no aliases on this guild."
#: redbot/cogs/alias/alias.py:391 redbot/cogs/alias/alias.py:409
msgid "Alias with the name `{name}` was successfully deleted."
msgstr ""
#: redbot/cogs/alias/alias.py:394 redbot/cogs/alias/alias.py:412
msgid "Alias with name `{name}` was not found."
msgstr ""
#: redbot/cogs/alias/alias.py:399
#, docstring
msgid "Delete an existing global alias."
msgstr ""
#: redbot/cogs/alias/alias.py:404
msgid "There are no aliases on this bot."
msgstr "Shiver me timbers! Thar be no aliases on this bot."
#: redbot/cogs/alias/alias.py:417
#, docstring
msgid "List the available aliases on this server."
msgstr ""
#: redbot/cogs/alias/alias.py:418 redbot/cogs/alias/alias.py:429
msgid "Aliases:"
msgstr "Yar Aliases:"
#: redbot/cogs/alias/alias.py:428
#, docstring
msgid "List the available global aliases on this bot."
msgstr ""

Some files were not shown because too many files have changed in this diff Show More