equal
deleted
inserted
replaced
1 |
1 |
2 local function dict (args) |
2 local dict = { ["desc"] = "Dictionnary" } |
|
3 |
|
4 function dict.cmd (args) |
3 if not args then return nil, "Give me a word, please" end |
5 if not args then return nil, "Give me a word, please" end |
4 -- Be careful as we pass it as an argument to a shell command |
6 -- Be careful as we pass it as an argument to a shell command |
5 local word = string.match(args, "^(%w+)[%s%?%.%!]*$") |
7 local word = string.match(args, "^(%w+)[%s%?%.%!]*$") |
6 if not word then return nil, "Can you repeat please?" end |
8 if not word then return nil, "Can you repeat please?" end |
7 |
9 |