Code Monkey home page Code Monkey logo

sans's People

Contributors

bleck9999 avatar glazedbelmont avatar gnomeddev avatar hamnuggets avatar itspizzatime1501 avatar lazr1026 avatar maretu avatar meganium97 avatar scarlettekk avatar suburbgira avatar techmuse8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

sans's Issues

POG

ADD MORE POG AND REWRITE BOT I DO COMMISSIONS 2 BUCKS PER BOT POG POG POG POG POG POG

We need new update code

So right now the only thing stopping us from self-hosting the bot are:

  1. The update code
  2. The multiple instances of remaining /home/lucas/
    Now I think what we could do it replicate Gnome's TTS bot's update code, by pulling directly from github whenever a pull is done.
    However, that would need to restart the bot.
    There is a solution for that as well, which is pm2, which is roughly coded.
    Here's a snippet of that TTS code I was talking about:


We just need to figure out how to do this and that should fix self-hosting problems.

Hi it's me the Spanish Inquisition

Sans/sans.py

Line 443 in 88b40af

subprocess.run(['sudo', '/home/pi/duckdns/sans.sh'])

Why the fuck does a discord bot need root perms?

Sans/sans.py

Lines 470 to 569 in 88b40af

async def help(ctx):
sent = 0
if ctx.message.content == ".help ctl":
await ctx.send("ctl commands are for admin usage.\nupdate: update code from github\nreboot: reboot the host machine\nservice: restart the sans service")
sent = 1
if ctx.message.content == ".help assistance":
await ctx.send('```Assistance commands are: cartinstall, cfwusues, dump, guide, lumabug, lumacheck, nospace, notbricked, r4, sdlock, sdroot, luma, sd, ndsforwarders, ap, vc, troubleshoot, twlfix, boot3dsx (or redscr)```')
sent = 1
if ctx.message.content == ".help cartinstall":
await ctx.send('```Shows the guide for cartinstall```')
sent = 1
if ctx.message.content == ".help cfwuses":
await ctx.send('```Shows what you can do with cfw```')
sent = 1
if ctx.message.content == ".help dump":
await ctx.send('```Shows the guide for how to dump your games```')
sent = 1
if ctx.message.content == ".help guide":
await ctx.send('```Shows the guide to install CFW on your console```')
sent = 1
if ctx.message.content == ".help lumabug":
await ctx.send('```lumabug\n\n Shows how to solve the lumabug```')
sent = 1
if ctx.message.content == ".help lumacheck":
await ctx.send('```Shows how to check your luma version```')
sent = 1
if ctx.message.content == ".help nospace":
await ctx.send('```Shows how to make a nand backup without enough space on your sd card```')
sent = 1
if ctx.message.content == ".help notbricked":
await ctx.send('```Shows that you are not bricked```')
sent = 1
if ctx.message.content == ".help r4":
await ctx.send('```Says what an r4 is and what it does/its uses```')
sent = 1
if ctx.message.content == ".help sdlock":
await ctx.send('```Shows how to unlock your sd card```')
sent = 1
if ctx.message.content == ".help sdroot":
await ctx.send('```Shows what the root of an sd card is```')
sent = 1
if ctx.message.content == ".help invite":
await ctx.send('```Invite commands are: ivan, homebrew, analog, and chill```')
sent = 1
if ctx.message.content == ".help ivan":
await ctx.send('```An invite to internet ivans discord server```')
sent = 1
if ctx.message.content == ".help homebrew":
await ctx.send('```An invite to Nintendo Homebrews discord server```')
sent = 1
if ctx.message.content == ".help memes":
await ctx.send('```Memes are: radeon, snas, uwuham, lazr, local58, pat, brick```')
sent = 1
if ctx.message.content == ".help pat":
await ctx.send('For when someone needs that extra bit of support.')
sent = 1
if ctx.message.content == ".help radeon":
await ctx.send('Type the command :wink:')
sent = 1
if ctx.message.content == ".help snas":
await ctx.send('Type the command :wink:')
sent = 1
if ctx.message.content == ".help uwuham":
await ctx.send('Type the command :wink:')
sent = 1
if ctx.message.content == ".help lazr":
await ctx.send('Type the command :wink:')
sent = 1
if ctx.message.content == ".help luma":
await ctx.send('Shows the different luma versions')
sent = 1
if ctx.message.content == ".help sd":
await ctx.send('Shows the guide to help you with your SD card')
sent = 1
if ctx.message.content == ".help ap":
await ctx.send('```Shows the AP-Patching guide```')
sent = 1
if ctx.message.content == ".help ndsforwarders":
await ctx.send('```Shows the NDS Forwarders guide```')
sent = 1
if ctx.message.content == ".help vc":
await ctx.send('```Shows the guide on how to play old classics on your system```')
sent = 1
if ctx.message.content == ".help local58":
await ctx.send('<@664297659686715403> says: honestly i have no idea what this is')
sent = 1
if ctx.message.content == ".help troubleshoot":
await ctx.send('```Shows how to troubleshoot seedminer based methods```')
sent = 1
if ctx.message.content == ".help twlfix":
await ctx.send('```Shows how to fix the DSiWare from different vantage points```')
sent = 1
if ctx.message.content == ".help brick":
await ctx.send('Type it :wink:')
sent = 1
if ctx.message.content == ".help boot3dsx":
await ctx.send('Gives a download link to boot.3dsx')
sent = 1
if sent == 0:
await ctx.send('```What can I help you with?\n\n assistance\n invite\n memes```')

this is not ok
there's already a default help command, you can set it by putting a string at the start of the function body (like L108, the helptext for about is "about Kurisu"

Sans/sans.py

Lines 1 to 8 in 88b40af

print('init')
import discord
import subprocess
print('stage0')
import asyncio
print('stage1')
from discord.ext import commands
from discord.ext.commands import MemberConverter

What are you trying to achieve here? Imports aren't really doing anything worth being broken up into 'stages'. Importing discord and subprocess does nothing to init anything, it just makes the modules available.

Sans/sans.py

Line 108 in 88b40af

"""About Kurisu"""

I think you missed this when removing kurisu references.

Sans/sans.py

Line 10 in 88b40af

client = commands.Bot(command_prefix = '.')

You're already using commands.Bot, why do you do this* complete mess then? You can specify arguments in the function prototype, you don't have to slice message.content to find them.

*some examples of the complete mess referenced earlier:

Sans/sans.py

Line 70 in 88b40af

if str(ctx.message.content).startswith(".guide 3ds"):

Sans/sans.py

Line 148 in 88b40af

if str(ctx.message.content).startswith(".soundhax hbl"):

Sans/sans.py

Line 203 in 88b40af

if str(ctx.message.content).startswith(".dump ds"):

Sans/sans.py

Lines 103 to 104 in 88b40af

if sent == 0:
await ctx.send('Options are: 3ds, wiiu, wii, nx')

This is not needed, you can just check if the argument(s) provided exist

Sans/sans.py

Line 399 in 88b40af

checkpoints = subprocess.run(['bash', '/home/pi/checkpoints.sh'], stdout=subprocess.PIPE)

The sh files you use throughout the program (plswhy) aren't provided and it's not stated where to find them. As is this program is incomplete.

Sans/sans.py

Line 443 in 88b40af

subprocess.run(['sudo', '/home/pi/duckdns/sans.sh'])

Potentially identifiable information.

Sans/sans.py

Line 458 in 88b40af

await ctx.send("Moved to `.ctl update`")

Why?

Sans/sans.py

Line 49 in 88b40af

embed.description = "**__3DS__**\n <@554832528238968883>\n <@578245729060126730>\n <@504564321716666368>\n <@505832724959985666>\n\n **__Wii U__**\n <@664297659686715403>\n\n **__Switch__**\n <@591994499069116417>"

Multiline strings exist, just surround the text block with either """ or '''

A few miscellaneous other points, Kurisu is licensed under the apache 2.0 license, meaning you need to provide a copy of the apache license with this code (given that you have most definitely used code from Kurisu) oh and INPUT SANITISATION. USE IT.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.