2019-01-15 01:48:23 +00:00
|
|
|
import discord
|
|
|
|
import config
|
2018-12-23 13:48:15 +00:00
|
|
|
from discord.ext import commands
|
|
|
|
|
|
|
|
|
|
|
|
class Links:
|
|
|
|
"""
|
|
|
|
Commands for easily linking to projects.
|
|
|
|
"""
|
|
|
|
|
|
|
|
def __init__(self, bot):
|
|
|
|
self.bot = bot
|
|
|
|
|
|
|
|
@commands.command(hidden=True)
|
|
|
|
async def pegaswitch(self, ctx):
|
2018-12-23 19:06:32 +00:00
|
|
|
"""Link to the Pegaswitch repo"""
|
2018-12-23 13:48:15 +00:00
|
|
|
await ctx.send("https://github.com/reswitched/pegaswitch")
|
|
|
|
|
2018-12-23 19:06:32 +00:00
|
|
|
@commands.command(hidden=True, aliases=["atmos"])
|
2018-12-23 22:11:01 +00:00
|
|
|
async def atmosphere(self, ctx):
|
2018-12-23 19:06:32 +00:00
|
|
|
"""Link to the Atmosphere repo"""
|
|
|
|
await ctx.send("https://github.com/atmosphere-nx/atmosphere")
|
2018-12-23 22:11:01 +00:00
|
|
|
|
2019-01-05 20:27:47 +00:00
|
|
|
@commands.command(hidden=True, aliases=["xyproblem"])
|
|
|
|
async def xy(self, ctx):
|
|
|
|
"""Link to the "What is the XY problem?" post from SE"""
|
2019-01-05 20:29:12 +00:00
|
|
|
await ctx.send("<https://meta.stackexchange.com/q/66377/285481>\n\n"
|
2019-01-05 20:27:47 +00:00
|
|
|
"TL;DR: It's asking about your attempted solution "
|
2019-01-05 20:29:12 +00:00
|
|
|
"rather than your actual problem.\n"
|
|
|
|
"It's perfectly okay to want to learn about a "
|
2019-01-05 20:27:47 +00:00
|
|
|
"solution, but please be clear about your intentions "
|
2019-01-05 20:29:12 +00:00
|
|
|
"if you're not actually trying to solve a problem.")
|
2019-01-05 20:27:47 +00:00
|
|
|
|
2019-01-08 08:30:25 +00:00
|
|
|
@commands.command(hidden=True, aliases=["guides", "link"])
|
2018-12-23 19:06:32 +00:00
|
|
|
async def guide(self, ctx):
|
|
|
|
"""Link to the guide(s)"""
|
2019-01-08 08:32:00 +00:00
|
|
|
await ctx.send("**Generic starter guides:**\n"
|
2019-01-08 08:30:25 +00:00
|
|
|
"Nintendo Homebrew's Guide: "
|
2019-01-07 08:49:19 +00:00
|
|
|
"<https://nh-server.github.io/switch-guide/>\n"
|
2019-01-12 22:58:27 +00:00
|
|
|
"AtlasNX's Guide: "
|
|
|
|
"<https://guide.teamatlasnx.com>\n"
|
2019-01-07 08:49:19 +00:00
|
|
|
"Pegaswitch Guide: <https://switch.hacks.guide/> "
|
2019-01-08 08:30:25 +00:00
|
|
|
"(outdated for anything but Pegaswitch/3.0.0)\n\n"
|
|
|
|
"**Specific guides:**\n"
|
2019-02-02 20:52:22 +00:00
|
|
|
"Manually Updating/Downgrading (with HOS): "
|
|
|
|
"<https://guide.sdsetup.com/#/manualupdate>\n"
|
|
|
|
"Manually Repairing/Downgrading (without HOS): "
|
|
|
|
"<https://guide.sdsetup.com/#/manualchoidowngrade>\n"
|
|
|
|
"How to get started developing Homebrew: "
|
2019-02-02 23:53:07 +00:00
|
|
|
"<https://gbatemp.net/threads/tutorial-switch-homebrew-development.507284/>\n"
|
2019-02-02 23:52:46 +00:00
|
|
|
"Use full RAM in homebrew without installing NSPs: "
|
|
|
|
"<https://gbatemp.net/threads/use-atmosphere-to-"
|
|
|
|
"access-full-ram-with-homebrews-without-nsp.521240/>")
|
2018-12-23 22:11:01 +00:00
|
|
|
|
2019-01-15 01:48:23 +00:00
|
|
|
@commands.command()
|
|
|
|
async def source(self, ctx):
|
|
|
|
"""Gives link to source code."""
|
|
|
|
await ctx.send(f"You can find my source at {config.source_url}. "
|
|
|
|
"Serious PRs and issues welcome!")
|
|
|
|
|
|
|
|
@commands.command()
|
|
|
|
async def rules(self, ctx, *, targetuser: discord.Member = None):
|
|
|
|
"""Post a link to the Rules"""
|
|
|
|
if not targetuser:
|
|
|
|
targetuser = ctx.author
|
|
|
|
await ctx.send(f"{targetuser.mention}: A link to the rules "
|
|
|
|
f"can be found here: {config.rules_url}")
|
|
|
|
|
2018-12-23 13:48:15 +00:00
|
|
|
|
|
|
|
def setup(bot):
|
|
|
|
bot.add_cog(Links(bot))
|