Skip to content

Proper user configurable jsk py dict vars #199

Description

@wildanrfq

The Problem

In the jishaku python's command, there's some aliases we can use to shorten our evaluation code, such as me for Context.me, get for discord.utils.get, etc.

I wonder if configurable aliases like those is possible to implement.

The Ideal Solution

My idea is to add more aliases to jishaku. Something like this design is what I'm thinking of:

import jishaku, discord

jishaku.EvalAliases.add(
  [
    "Embed", discord.Embed,
    "ref", ctx.message.reference.resolved,
  ]
)

The Current Solution

Fork the repository and add the desired aliases manually into the get_var_dict_from_ctx function in repl_builtins.py file.

Summary

A feature that allows the user to configure or add jsk py aliases to use in the command.

I don't know if this feature is already possible to do or implemented, so I'm making an issue to make sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    no acceptable implno known implementation that suitably satisfies the conditions of closure within standards

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions