Silence starts🤫

This commit is contained in:
2024-04-26 20:04:02 +02:00
parent c5bcc69347
commit 6827a26dc9
6 changed files with 2082 additions and 1 deletions

2
.env.sample Normal file
View File

@@ -0,0 +1,2 @@
TELEGRAM_API_HASH=
TELEGRAM_API_ID=

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
node_modules
IHateAudio.cache
IHateAudio.session

View File

@@ -1,3 +1,6 @@
# bothoven
If you are not able to improve the silence don't break it.
If you are not able to improve the silence don't break it.
## Telegram API Keys
(https://my.telegram.org/auth?to=apps)[https://my.telegram.org/auth?to=apps]

29
index.js Normal file
View File

@@ -0,0 +1,29 @@
const { Snake } = require('tgsnake');
// replace the value below with the Telegram token you receive from @BotFather
const API_HASH = process.env.TELEGRAM_API_HASH || '9999999999:asdfASDF-asdfasdf_asdf';
const API_ID = process.env.TELEGRAM_API_ID || 12312312;
const client = new Snake(
{
apiHash : API_HASH,
apiId : API_ID,
login : {
botToken : '',
sessionName : 'IHateAudio',
forceDotSession : true,
},
logLevel : ['error','info'],
clientOptions : {"ipv6":false},
plugins : []
}
);
//const client = new Snake();
client.on('msg.voice', (ctx) => {
if(ctx.message.chat.type === "private"){
ctx.msg.reply("Erabiltzaile honek ez du audio mezurik onartzen. Esta usuaria no acepta mensajes de audio. This user doesn't allow audio messages. 🤷🏻‍♀️");
}
});
client.run(); //snake running

2028
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

15
package.json Normal file
View File

@@ -0,0 +1,15 @@
{
"name": "bothoven",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"node-telegram-bot-api": "^0.65.1",
"tgsnake": "^3.1.0"
}
}