This repository has been archived by the owner on Jul 12, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thomas Bnt
committed
Mar 21, 2018
1 parent
aa1a1d7
commit 2666e47
Showing
5 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 Thomas Bnt | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<img src="favicon.png" align="right" /> | ||
|
||
# Robot Discord Basique en JS | ||
|
||
Un simple robot Discord pour commencer à développer le sien. Développé sous Javascript et NodeJS. | ||
|
||
### Historique de version | ||
|
||
#### v1.0 - [Télécharger](https://github.com/thomasbnt/Robot-Discord-Basique-en-JS/releases/tag/v1.0) - [Tutoriel](https://thomasbnt.fr/robot-discord-basique/) | ||
- Déclaration du préfixe | ||
- Message ping pong | ||
- Message privé | ||
|
||
|
||
### Contribute | ||
|
||
Contributions are always welcome! | ||
Please read the [contribution guidelines](contributing.md) first. | ||
|
||
### License | ||
|
||
[Apache License](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const Discord = require('discord.js'); | ||
const client = new Discord.Client(); | ||
|
||
// On déclare le préfixe | ||
var prefix = '?'; | ||
|
||
client.on("message", message => { | ||
|
||
// Le robot lui répondra pong si il envoi ping | ||
if (message.content === "ping"){ | ||
// le robot répond pong ! | ||
message.channel.send("Pong !"); | ||
}; | ||
|
||
|
||
// Le robot lui répondra ceci si un utilisateur fait ?help | ||
if (message.content.startsWith(prefix + "help")) { | ||
message.channel.send("Vous avez fait `?help` pour avoir l'aide."); | ||
}; | ||
if (message.content == "mp"){ | ||
message.author.send("voici un message privé !") | ||
}; | ||
|
||
}) | ||
client.login("VOTRE TOKEN ICI SANS ESPACE"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Contribution Guidelines | ||
|
||
Please ensure your pull request adheres to the following guidelines: | ||
|
||
- Alphabetize your entry. | ||
- Search previous suggestions before making a new one, as yours may be a duplicate. | ||
- Suggested READMEs should be beautiful or stand out in some way. | ||
- Make an individual pull request for each suggestion. | ||
- New categories, or improvements to the existing categorization are welcome. | ||
- Keep descriptions short and simple, but descriptive. | ||
- Start the description with a capital and end with a full stop/period. | ||
- Check your spelling and grammar. | ||
- Make sure your text editor is set to remove trailing whitespace. | ||
|
||
Thank you for your suggestions! |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.