forked from Cog-Creators/Red-DiscordBot
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SNSConverter] Rename cog from VxTwitConverter (#659)
* [SNSConverter] Rename cog from VxTwit Since the cog now replaces Twitter and Instagram embeds, rename the cog to SNSConverter. * [SNSConverter] Replace VxTwitConverter with SNSConverter This commit is a breaking change! It does the following sed replacements: - `s/vxtwitconverter/snsconverter/g` - `s/VxTwitConverter/SNSConverter/g` - `s/VxTwitter/SNSConverter/g` - `s/VxTwit /SNSConverter /g` It also renames vxtwitconverter.py file to snsconverter.py. Since the cog name changes, the config directory changes. No attempts to reconcile the previous config file will be made here. Please reconfigure the cog. * [SNSConverter] Replace remaining references of old cog This commit replaces the remaining references of vxtwit from generic function names and decorators to reflect the new cog name. * [SNSConverter] Update info.json * [SNSConverter] Reformat with black
- Loading branch information
Showing
13 changed files
with
53 additions
and
49 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
cogs/vxtwitconverter/__init__.py → cogs/snsconverter/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
from redbot.core.bot import Red | ||
|
||
from .vxtwitconverter import VxTwitConverter | ||
from .snsconverter import SNSConverter | ||
|
||
|
||
async def setup(bot: Red): | ||
"""Add the cog to the bot.""" | ||
await bot.add_cog(VxTwitConverter(bot)) | ||
await bot.add_cog(SNSConverter(bot)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from redbot.core import checks, commands | ||
from redbot.core.commands.context import Context | ||
|
||
from .commandsCore import CommandsCore | ||
|
||
|
||
class CommandHandlers(CommandsCore): | ||
@commands.group(name="snsconverter", aliases=["sns"]) | ||
@checks.is_owner() | ||
async def _grpSns(self, ctx: Context): | ||
"""SNSConverter settings""" | ||
|
||
@_grpSns.command(name="toggle") | ||
async def _cmdToggle(self, ctx: Context): | ||
"""Toggle SNSConverter replacements on the server | ||
This will toggle the auto-reply of any Twitter or Instagram links with | ||
embeds, and replace them with vxtwitter or ddinstagram, respectively. | ||
""" | ||
await self.cmdToggle(ctx) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name" : "SNSConverter", | ||
"author" : ["j4d3r48817", "injabie3", "quachtridat"], | ||
"short" : "Replace Twitter/Instagram embeds with better embeds", | ||
"description" : "Converts Twitter/Instagram links to vxtwitter/ddinstagram for better video embeds", | ||
"install_msg" : "SNSConverter installed", | ||
"requirements" : [], | ||
"tags" : ["server"], | ||
"permissions" : ["manage_messages"], | ||
"end_user_data_statement": "no data is stored" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from redbot.core import commands | ||
|
||
from .commandHandlers import CommandHandlers | ||
from .eventHandlers import EventHandlers | ||
|
||
|
||
class SNSConverter(commands.Cog, CommandHandlers, EventHandlers): | ||
"""Converts Twitter link to SNSConverter for better video embeds""" | ||
|
||
pass |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.