sourcecode command
This commit is contained in:
parent
6cc4f8fcdc
commit
ccea8e224c
18
modules/github.py
Normal file
18
modules/github.py
Normal file
@ -0,0 +1,18 @@
|
||||
import discord
|
||||
import traductions as tr
|
||||
|
||||
|
||||
class MainClass:
|
||||
name = "github"
|
||||
def __init__(self, guild):
|
||||
self.guild = guild
|
||||
|
||||
async def sourcecode(self,msg, command, args):
|
||||
await msg.channel.send(tr.tr[self.guild.config["lang"]]["modules"]["github"]["sourcecode"])
|
||||
|
||||
async def on_message(self, msg):
|
||||
if msg.content.startswith(self.guild.config["prefix"]):
|
||||
command, *args = msg.content.lstrip(self.guild.config["prefix"]).split(" ")
|
||||
if command == "sourcecode":
|
||||
await self.sourcecode(msg, command, args)
|
||||
return
|
@ -119,6 +119,19 @@ tr = {
|
||||
},
|
||||
"pi": "Voici les 2000 décimales de pi que vous avez demandé (à partir de la {debut}ème):",
|
||||
},
|
||||
"github": {
|
||||
"description": "Commands relatives à discord",
|
||||
"help": {
|
||||
"sourcecode": {
|
||||
"description": "Donne un lien vers mon code source (il est là comme ca tu a pas retapper la \
|
||||
commande :smile: https://github.com/Fomys/foBot",
|
||||
"examples":[
|
||||
("`prefix`sourcecode", "Affiche mon code source")
|
||||
]
|
||||
},
|
||||
},
|
||||
"sourcecode":"Mon code source est disponible sur github: https://github.com/Fomys/foBot",
|
||||
},
|
||||
"tools": {
|
||||
"description": "Commandes utiles",
|
||||
"help": {
|
||||
|
Loading…
Reference in New Issue
Block a user