aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndrajith K L2021-03-11 16:23:40 +0530
committerIndrajith K L2021-03-11 16:23:40 +0530
commit98c9b85965399a9da9eb1fe1f2dc29a0563a723f (patch)
tree20b3c9d2f656f4ce2feb9d6635d8069732c03aa5
downloadradio-bot-98c9b85965399a9da9eb1fe1f2dc29a0563a723f.tar.gz
radio-bot-98c9b85965399a9da9eb1fe1f2dc29a0563a723f.tar.bz2
radio-bot-98c9b85965399a9da9eb1fe1f2dc29a0563a723f.zip
Initial Commit
* Adds Basic Funny replies * TODO : Commands
-rw-r--r--.gitignore116
-rw-r--r--package-lock.json112
-rw-r--r--package.json17
-rw-r--r--src/main.js36
4 files changed, 281 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d5a06f7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,116 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+lerna-debug.log*
+
+# Diagnostic reports (https://nodejs.org/api/report.html)
+report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
+
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+*.lcov
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Bower dependency directory (https://bower.io/)
+bower_components
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (https://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+node_modules/
+jspm_packages/
+
+# Snowpack dependency directory (https://snowpack.dev/)
+web_modules/
+
+# TypeScript cache
+*.tsbuildinfo
+
+# Optional npm cache directory
+.npm
+
+# Optional eslint cache
+.eslintcache
+
+# Microbundle cache
+.rpt2_cache/
+.rts2_cache_cjs/
+.rts2_cache_es/
+.rts2_cache_umd/
+
+# Optional REPL history
+.node_repl_history
+
+# Output of 'npm pack'
+*.tgz
+
+# Yarn Integrity file
+.yarn-integrity
+
+# dotenv environment variables file
+.env
+.env.test
+
+# parcel-bundler cache (https://parceljs.org/)
+.cache
+.parcel-cache
+
+# Next.js build output
+.next
+out
+
+# Nuxt.js build / generate output
+.nuxt
+dist
+
+# Gatsby files
+.cache/
+# Comment in the public line in if your project uses Gatsby and not Next.js
+# https://nextjs.org/blog/next-9-1#public-directory-support
+# public
+
+# vuepress build output
+.vuepress/dist
+
+# Serverless directories
+.serverless/
+
+# FuseBox cache
+.fusebox/
+
+# DynamoDB Local files
+.dynamodb/
+
+# TernJS port file
+.tern-port
+
+# Stores VSCode versions used for testing VSCode extensions
+.vscode-test
+
+# yarn v2
+.yarn/cache
+.yarn/unplugged
+.yarn/build-state.yml
+.yarn/install-state.gz
+.pnp.* \ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..72c7b54
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,112 @@
+{
+ "name": "lul-bot",
+ "version": "1.0.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "@discordjs/collection": {
+ "version": "0.1.6",
+ "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.6.tgz",
+ "integrity": "sha512-utRNxnd9kSS2qhyivo9lMlt5qgAUasH2gb7BEOn6p0efFh24gjGomHzWKMAPn2hEReOPQZCJaRKoURwRotKucQ=="
+ },
+ "@discordjs/form-data": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz",
+ "integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==",
+ "requires": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "mime-types": "^2.1.12"
+ }
+ },
+ "abort-controller": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
+ "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
+ "requires": {
+ "event-target-shim": "^5.0.0"
+ }
+ },
+ "asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
+ },
+ "combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "requires": {
+ "delayed-stream": "~1.0.0"
+ }
+ },
+ "delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
+ },
+ "discord.js": {
+ "version": "12.5.1",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.5.1.tgz",
+ "integrity": "sha512-VwZkVaUAIOB9mKdca0I5MefPMTQJTNg0qdgi1huF3iwsFwJ0L5s/Y69AQe+iPmjuV6j9rtKoG0Ta0n9vgEIL6w==",
+ "requires": {
+ "@discordjs/collection": "^0.1.6",
+ "@discordjs/form-data": "^3.0.1",
+ "abort-controller": "^3.0.0",
+ "node-fetch": "^2.6.1",
+ "prism-media": "^1.2.2",
+ "setimmediate": "^1.0.5",
+ "tweetnacl": "^1.0.3",
+ "ws": "^7.3.1"
+ }
+ },
+ "dotenv": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
+ "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
+ },
+ "event-target-shim": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
+ "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
+ },
+ "mime-db": {
+ "version": "1.46.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz",
+ "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ=="
+ },
+ "mime-types": {
+ "version": "2.1.29",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz",
+ "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==",
+ "requires": {
+ "mime-db": "1.46.0"
+ }
+ },
+ "node-fetch": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
+ "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
+ },
+ "prism-media": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.2.7.tgz",
+ "integrity": "sha512-thS1z3L6BDmf724sqLC73bHGjSYArFTYHa7cqInyS3EdDNTHKgDCXy7l+IhRvlnX7aFNiUb8jJcC+R8ezxwgMA=="
+ },
+ "setimmediate": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
+ "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU="
+ },
+ "tweetnacl": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz",
+ "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw=="
+ },
+ "ws": {
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.4.tgz",
+ "integrity": "sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw=="
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..8cd2046
--- /dev/null
+++ b/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lul-bot",
+ "version": "1.0.0",
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "start": "node ./src/main.js",
+ "dev": "nodemon ./src/main.js"
+ },
+ "keywords": [],
+ "author": "",
+ "license": "ISC",
+ "dependencies": {
+ "discord.js": "^12.5.1",
+ "dotenv": "^8.2.0"
+ }
+}
diff --git a/src/main.js b/src/main.js
new file mode 100644
index 0000000..f841f85
--- /dev/null
+++ b/src/main.js
@@ -0,0 +1,36 @@
+require('dotenv').config();
+
+const { Client } = require('discord.js');
+
+const client = new Client();
+const CMD_PREFIX = "!"
+client.on('message', (message) => {
+ if (message.author.bot) return;
+ if (message.content.startsWith(CMD_PREFIX)) {
+
+ } else {
+ message.reply(parseCasualMessage(message));
+ }
+});
+
+function parseCasualMessage(message) {
+ const {content} = message;
+ switch(content.trim()) {
+ case 'hello': return `Hey ${message.author} ๐Ÿ™‹โ€โ™‚๏ธ. How Are You?`;
+ case 'เดนเดฒเต‹': return `เดนเดฒเตเดฒเดพ.... เด‡เดคเดพเดฐเดพ ${message.author}เดฏเต‹... เดธเตเด–เด‚ เดคเดจเตเดจเต†?`;
+ case 'เดŽเดจเตเดคเตŠเด•เตเด•เต† เด‰เดฃเตเดŸเต เดตเดฟเดถเต‡เดทเด‚':
+ case 'enthokke und vishesham' : return `เด…เด™เตเด™เดฟเดจเต† เดชเต‹เดฃเต...๐Ÿคทโ€โ™‚๏ธ เดธเตเด–เด™เตเด™เดณเตŠเด•เตเด•เต† เดคเดจเตเดจเต†?`;
+ case 'เดฎเดจเตเดธเตเดธเดจเดฒเตเดฒเต‡ เดชเตเดณเตเดณเต†' :
+ case 'manusanalle pulle': return `เด‡เดฑเดšเตเดšเดฟเดฏเตเด‚ เดฌเดฑเต‹เดŸเตเดŸเดฏเตเด‚ เดตเต‡เดฃเดพเดฏเดฟเดฐเดฟเด•เตเด•เตเด‚... ๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ`;
+ case 'เดจเต€ เด†เดฐเดพ':
+ case 'nee aara': return `เดคเดพเตป เด†เดฐเดพเดฃเต†เดจเตเดจเต เดคเดจเดฟเด•เตเด•เต เด…เดฑเดฟเดฏเดพเดจเตเดฎเต‡เดฒเต†เด™เตเด•เดฟเตฝ เดคเดพเตป เดŽเดจเตเดจเต‹เดŸเต เดšเต‹เดฏเตเด•เตเด•เต เดคเดพเตป เด†เดฐเดพเดฃเต†เดจเตเดจเต??? เดคเดจเดฟเด•เตเด•เต เดžเดพเตป เดชเดฑเดžเตเดžเต เดคเดฐเดพเด‚ เดคเดพเตป เด†เดฐเดพเดฃเต†เดจเตเดจเต... ๐Ÿคช๐Ÿคช`;
+ }
+}
+
+client.login(process.env.LUL_BOT_TKN)
+ .then(() => {
+ console.log("BOT Logged in");
+ })
+ .catch((error) => {
+ console.error("BOT Login Failed ", error);
+ });