Discord.py bilingual help message - discord.py

Is it possible to create a bilingual help message using discord.py commands? So when !help is used, it shows the English help message and when another alias !hilfe is used, it shows the German one (for example)?
A simple solution would be to just implement the command separatly. But I am wondering whether there is an inbuilt solution.

Related

Why avatar_url discord.py doesn't work when I host the bot in heroku?

So, I was making a embed creator bot, and for the avatar icon in the author and the footer I used member.avatar_url.
But when I uploaded the bot to heroku I noticed that the question that asked you to say if you wanted to put an author or not, wasn't working and there was stopping the wait for process.
In the requirements file I put the link to the github repository of discord.py.
am I missing something that I should include in that file in order to make the mehthod work?
Sorry for mi english, I'm a spanish teenager and I'm not using the traductor for writing this.
Thanks!
You're writing code dependant on a version and using a different version while hosting. User.avatar_url is only available on versions lesser discord.py v2.0.
Discord v2.0 uses User.avatar.url.
You can find the docs in https://discordpy.readthedocs.io/en/master/
As there is no proper migrating guide for v2.0 you can find some major changes on https://discord.gg/r3sSKJJ (Discord's official server).

Hugo - how to make pages in other languages

I have 3 languages for my project, en, es and ch.
When I add a contact page ( site/content/contact.html ) I'm able to access it from /contact but I'm expecting to also be able to get to /es/contact and just i18n to translate everything.
Instead /es/contact gives me the poop emoji.
Can someone tell me what I need to to to get that path to work?
possibly some more information so we can help you out. Did you, as of yet, implement i18n, if so, how?
https://phrase.com/blog/posts/i18n-tutorial-how-to-go-multilingual-with-hugo/
is an excellent example of how to do this.
Are you waiting for a translation to be automatically done for you?
Please clarify and I'm sure we can assist, but the above will be of great assistance as a primer.
(The path for the translated content and how to set this up is covered in the above as well)

Auto format #1234 string in Microsoft Teams channel

Is it possible to add some code or something else to make it possible that whenever I type a hashtag followed by a number that this will be replaced by a url?
My requirement is whenever some developer mention a ticket number like #1234 in his chat post into a channel I want to make this clickable and directly opens a url like myticketsystem.com?id=1234.
If I understand correctly, you're looking to implement an auto-linking similar to how GitHub handles things like Fixes issue #xxxx? It isn't possible to implement this in Teams today, it isn't possible to inject your own logic into the composition rendering pipeline.
What you could do however is build a Compose Extension. This wouldn't replicate the GitHub experience but it would certainty make it easier to insert links to tickets into the compose editor. It could also be a more powerful tool, allowing users to search the ticketing system rather than having to know the number before writing the post.

Getting data (text, ...) what user says

Is it possible to get the text of what a user says to Google home ? I couldn't find any way how to do that.
I have an API that can process language as a text. If that's not possible, is it possible to get what users says. I could then use speech recognition to get the text.
Thank you
It looks like you can use the RawInputs portion of the conversation API.
https://developers.google.com/actions/reference/v1/conversation#RawInputs

How do I send an email from my webpage?

I am not a web developer but I do have a lot of programming experience in C# and Windows forms programming. On our company webpage my boss wants me to put in a textbox where visitors can submit a comment and press a submit button and that comment will be sent to an email address. Right now, our website uses just plain old html, no php or javascript or anything like that. I am wondering what is the simplest way to accomplish what I need? Can someone point me in the right direction? The website is hosted on an Apache server so I won't be able to use aspx.
The simplest method depends heavily on what is available. If PHP is supported, use it.
Here's a simple example (I wouldn't focus too much on their HTML -- which is a bit shoddy) but the PHP at the bottom to give you an idea on how to pull the <form> in and send the email.
If you don't have PHP and don't want to install it, you can do this without any server-side code and outsource the problem. Bravenet (a name that will be familiar with any old-school webdeveloper) have a free hosted form solution that lets you post your forms to their server and they email you the result.
Not amazingly professional, but takes about 10 seconds to implement.
The simplest solution would be have the form action as "mailto:email#address.com"
However, this has the downside of the email address being sent to being exposed to spam bots, along with the clients mail application having to load to send the email which can be confusing and slow.
Sending emails in PHP is common, and there are thousands of articles out there on how to do it, here's one
In this case the most simple way is to install PHP to your apache to use the mail()-function.
Of couse you could use tomcat additional to apache, but the configuaration is much more time-eating.
If you don't want to use any sort of scripting technology, then the form mailto might be your only option. You can just make the action of your HTML form mailto:youraddress and the form post will be mailed directly.
I would highly recommend looking into some sort of scripting technology though to do this in a more reliable way....PHP looks like a good fit in your environment.

Resources