Giter Club home page Giter Club logo

Comments (7)

matpow2 avatar matpow2 commented on August 20, 2024

Yes.

from cuwo.

AlexMl avatar AlexMl commented on August 20, 2024

:)

from cuwo.

Jakky89 avatar Jakky89 commented on August 20, 2024

Already implemented in my fork so no double work please.

from cuwo.

matpow2 avatar matpow2 commented on August 20, 2024

This?

https://github.com/Jakky89/cuwo/blob/master/scripts/commands.py#L78

That's not a properly implemented help command. Ideally, the help command should iterate through all the script objects and give usage information based on that (and perhaps the function objects' docstrings).

from cuwo.

Jakky89 avatar Jakky89 commented on August 20, 2024

Oh I see there is a mistake in it but the help will get shown also with the welcome message: https://github.com/Jakky89/cuwo/blob/master/scripts/welcome.py

The messages itsself are stored in the config.py so they also should be easily translatable and extendable (not complete yet):

# Command help provided to players
help_players = ["=== PLAYER COMMANDS HELP ===",
                "/register <password> - use this to get an unique id when joining the first time",
                "/login <id> <password> - login after joining using your numeric id you got on registering and the right password",
                "/spawn - teleports you to the spawn point",
                "/list - shows you who currently is online and also their classes/levels",
                "/whereis <player> - tells you who is where (coordinates)",
                "/tell <player> <message> - allows you to send a private message to the given player"]

from cuwo.

mid-kid avatar mid-kid commented on August 20, 2024

I finished some Proof Of Concept code: https://github.com/mid-kid/cuwo/commit/a05ccc9868a27c09f0870814bd4dbdbc79862ffe

It does'nt look that difficult after this, Just check if the arguments are optional or not (to list them in <> or []), Check if the docstring exists, if so, add it at the end of every line, and to finish, list only the lines between (page * 5 - 5) and (page * 5). Maybe even add a counter to show on which page you are.

EDIT: It is almost impossible to check all of the arguments automatically since some of them use _args and admin commands are even worse, since the decorator replaces all arguments with *arg and *_kw. IDK where else I should try to get usage info ๐Ÿ˜•

from cuwo.

matpow2 avatar matpow2 commented on August 20, 2024

Done

from cuwo.

Related Issues (20)

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.