Seraph19 commited on
Commit
cf8b9d7
1 Parent(s): 666e5a8

Upload 5 files

Browse files
Files changed (5) hide show
  1. .npmrc +1 -0
  2. app.py +1 -21
  3. bot.py +38 -0
  4. package-lock.json +78 -0
  5. requirements.txt +11 -0
.npmrc ADDED
@@ -0,0 +1 @@
 
 
1
+ foreground-scripts=true
app.py CHANGED
@@ -1,24 +1,4 @@
1
- from telegram.ext import Updater, CommandHandler
2
-
3
- # Telegram Bot Token from BotFather
4
- TOKEN = '7322594950:AAFS4FOOYCdDnJy6VZUM4-6T86_mA18pxjQ '
5
-
6
- def start(update, context):
7
- update.message.reply_text('Welcome to the SANTIM Bot!')
8
-
9
- def distribute(update, context):
10
- # Token distribution logic here
11
- update.message.reply_text('Your token has been sent!')
12
-
13
- def main():
14
- updater = Updater(TOKEN, use_context=True)
15
- dp = updater.dispatcher
16
-
17
- dp.add_handler(CommandHandler("start", start))
18
- dp.add_handler(CommandHandler("distribute", distribute))
19
-
20
- updater.start_polling()
21
- updater.idle()
22
 
23
  if __name__ == '__main__':
24
  main()
 
1
+ from bot import main
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  if __name__ == '__main__':
4
  main()
bot.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
2
+
3
+ # Your token from BotFather
4
+ TELEGRAM_TOKEN = ' 7322594950:AAFS4FOOYCdDnJy6VZUM4-6T86_mA18pxjQ '
5
+
6
+ def start(update, context):
7
+ """Send a message when the command /start is issued."""
8
+ update.message.reply_text('Welcome! to santim .')
9
+
10
+ def help_command(update, context):
11
+ """Send a message when the command /help is issued."""
12
+ update.message.reply_text('Send /distribute to receive your token.')
13
+
14
+ def distribute(update, context):
15
+ """Simulate token distribution (you'll add your logic here)."""
16
+ # Add logic to distribute tokens to the user here
17
+ update.message.reply_text('Token distribution in progress!')
18
+
19
+ def main():
20
+ """Start the bot."""
21
+ updater = Updater(TELEGRAM_TOKEN, use_context=True)
22
+
23
+ # Get the dispatcher to register handlers
24
+ dp = updater.dispatcher
25
+
26
+ # Register handlers for commands
27
+ dp.add_handler(CommandHandler("start", start))
28
+ dp.add_handler(CommandHandler("help", help_command))
29
+ dp.add_handler(CommandHandler("distribute", distribute))
30
+
31
+ # Start the Bot
32
+ updater.start_polling()
33
+
34
+ # Run the bot until you press Ctrl+C
35
+ updater.idle()
36
+
37
+ if __name__ == '__main__':
38
+ main()
package-lock.json ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "home",
3
+ "lockfileVersion": 3,
4
+ "requires": true,
5
+ "packages": {
6
+ "": {
7
+ "dependencies": {
8
+ "@gaspump/sdk": "^0.0.7"
9
+ }
10
+ },
11
+ "node_modules/@gaspump/sdk": {
12
+ "version": "0.0.7",
13
+ "resolved": "https://registry.npmjs.org/@gaspump/sdk/-/sdk-0.0.7.tgz",
14
+ "integrity": "sha512-Ao/9pIXW1cN233Q2EQtQkpQEp2xC1Kym1ag4TYxQ1J/JbtSRlyld+FrJgMLpVKyPwvD2DvqZ/s9zmNckKRh52w==",
15
+ "license": "ISC",
16
+ "dependencies": {
17
+ "@ton/core": "~0.56.3"
18
+ }
19
+ },
20
+ "node_modules/@ton/core": {
21
+ "version": "0.56.3",
22
+ "resolved": "https://registry.npmjs.org/@ton/core/-/core-0.56.3.tgz",
23
+ "integrity": "sha512-HVkalfqw8zqLLPehtq0CNhu5KjVzc7IrbDwDHPjGoOSXmnqSobiWj8a5F+YuWnZnEbQKtrnMGNOOjVw4LG37rg==",
24
+ "license": "MIT",
25
+ "dependencies": {
26
+ "symbol.inspect": "1.0.1"
27
+ },
28
+ "peerDependencies": {
29
+ "@ton/crypto": ">=3.2.0"
30
+ }
31
+ },
32
+ "node_modules/@ton/crypto": {
33
+ "version": "3.3.0",
34
+ "resolved": "https://registry.npmjs.org/@ton/crypto/-/crypto-3.3.0.tgz",
35
+ "integrity": "sha512-/A6CYGgA/H36OZ9BbTaGerKtzWp50rg67ZCH2oIjV1NcrBaCK9Z343M+CxedvM7Haf3f/Ee9EhxyeTp0GKMUpA==",
36
+ "license": "MIT",
37
+ "peer": true,
38
+ "dependencies": {
39
+ "@ton/crypto-primitives": "2.1.0",
40
+ "jssha": "3.2.0",
41
+ "tweetnacl": "1.0.3"
42
+ }
43
+ },
44
+ "node_modules/@ton/crypto-primitives": {
45
+ "version": "2.1.0",
46
+ "resolved": "https://registry.npmjs.org/@ton/crypto-primitives/-/crypto-primitives-2.1.0.tgz",
47
+ "integrity": "sha512-PQesoyPgqyI6vzYtCXw4/ZzevePc4VGcJtFwf08v10OevVJHVfW238KBdpj1kEDQkxWLeuNHEpTECNFKnP6tow==",
48
+ "license": "MIT",
49
+ "peer": true,
50
+ "dependencies": {
51
+ "jssha": "3.2.0"
52
+ }
53
+ },
54
+ "node_modules/jssha": {
55
+ "version": "3.2.0",
56
+ "resolved": "https://registry.npmjs.org/jssha/-/jssha-3.2.0.tgz",
57
+ "integrity": "sha512-QuruyBENDWdN4tZwJbQq7/eAK85FqrI4oDbXjy5IBhYD+2pTJyBUWZe8ctWaCkrV0gy6AaelgOZZBMeswEa/6Q==",
58
+ "license": "BSD-3-Clause",
59
+ "peer": true,
60
+ "engines": {
61
+ "node": "*"
62
+ }
63
+ },
64
+ "node_modules/symbol.inspect": {
65
+ "version": "1.0.1",
66
+ "resolved": "https://registry.npmjs.org/symbol.inspect/-/symbol.inspect-1.0.1.tgz",
67
+ "integrity": "sha512-YQSL4duoHmLhsTD1Pw8RW6TZ5MaTX5rXJnqacJottr2P2LZBF/Yvrc3ku4NUpMOm8aM0KOCqM+UAkMA5HWQCzQ==",
68
+ "license": "ISC"
69
+ },
70
+ "node_modules/tweetnacl": {
71
+ "version": "1.0.3",
72
+ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz",
73
+ "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==",
74
+ "license": "Unlicense",
75
+ "peer": true
76
+ }
77
+ }
78
+ }
requirements.txt ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ anyio==4.4.0
2
+ certifi==2024.8.30
3
+ charset-normalizer==3.3.2
4
+ h11==0.14.0
5
+ httpcore==1.0.5
6
+ httpx==0.27.2
7
+ idna==3.10
8
+ python-telegram-bot==21.5
9
+ requests==2.32.3
10
+ sniffio==1.3.1
11
+ urllib3==2.2.3