Comments (11)
Ok wow! You implemented everything. Awesome man! Also love the new ticket number option #tID. Sleek! Love it!
I just tried the /ban
command by reply. Also getting the User with ticket #t646148857 banned
however my the user is still being able to use the support bot / messages are being forwarded...
I was also wondering is there a command like /unban
?
Also, am I able to turn off webpage preview in the /faq
command?
I also noticed that lang_contactMessage
seems to pop up more frequently now, is that the case?
Thanks for your continuous help!
from telegram-support-bot.
Something like this is not yet implemented in the public version. You can however restrict a user in the code itself by changing some lines:
Wrap everything from line 101 to 157:
ticket_handler.js
(line 101):
var bannedUsers = [ // ticket numbers of users to be banned
'907093210', // banned user 1
'422589730', // banned user 2
'521741214' // banned user 3
];
if (
JSON.stringify(bannedUsers).indexOf(ctx.from.id) > -1
) {
cache.tickedID = ctx.message.from.id;
[ ... ] (keep everything from line 101 to 157 as it is and wrap it in the if-statement)
console.log(
'Ticket: ' +
' #' +
cache.tickedID +
userInfo.replace('\n\n', ': ') +
ctx.message.text
);
};
Where you can define the banned users with their ticket ids. Please report back how this works.
EDIT: updated the above example. Here is the full code if you need it: https://gist.github.com/bostrot/d48b8951d0cb0bcf808616feb03251cd
from telegram-support-bot.
Hi there,
Thanks for your reply.
I did update it and replaced it with my test accounts ID however the message keeps being forwarded. I just attached a snipped of my code https://imgur.com/vMYd0Eh.png.
I was also wondering, am I able to use markdown in startCommandText;faqCommandText;lang_contactMessage;lang_blockedSpam?
Thanks again for your help, much appreciated!
from telegram-support-bot.
Oh! I just think we misunderstood each other. In terms of restricting I meant to restrict a user from being able to contact the support / communicate with the bot. So I can ban/restrict spammers lets say.
from telegram-support-bot.
My mistake, I sent you the wrong section where to implement it. Wrap everything from line 101 to 157 into the statement. See updated reply #15 (comment)
Also you currently cannot use markdown in those variables you mentioned. You can however use something like \n
for line breaks e.g. I plan to include the markdown support in an upcoming version.
from telegram-support-bot.
No worries, thanks for the update will try that out.
Alright, yes I was using \n already was just hoping to hide links behind text / make text bold. But thats is ok. Looking forward for the update ;)
I was also wondering - the user first name, username (or undefined) can simply be a tag/mention so that I am also able to click on the telegrams profile of a user which did not setup a username. That would prob help a lot.
Anyways, great working bot!
from telegram-support-bot.
The latest commit ef08eea adds the ability to use the /ban
option (just like you use /close
) to restrict users from not being able to write to your staff chat anymore. I also included the way to mention users as you proposed. So there is no username anymore, instead you can click on the users name and see the profile with its id.
Some more minor things are included too. Spam filter is down from 6 messages to 5 per [time you define in config]. Reply how it goes.
from telegram-support-bot.
Done e147f48.
Yes, initially I intended to use the Telegram hashtag system to find older tickets of that user. I didn't expect that a Telegram hashtag has to begin with a normal character and not a number though. Fixed that by putting t in front of it.
You can disable webpage preview by changing l. 192 from:
ctx.reply(config.faqCommandText, cache.html);
to
ctx.reply(config.faqCommandText, Extra.webPreview(false));
I couldn't verify the lang_contactMessage
popping up more often than before. Should only popup first time a user writes a message and after the staff has replied to a message.
About the unban
command. Thats a nice idea although I have no plans to implement it right now as you can unban a user by /close
ing their ticket. I think that should be enough for now.
from telegram-support-bot.
Awesome, it's all working now perfectly. Didnt know that the /close
would unban a user. Thats totally fine, good to know.
Was prob something on my end then, as lang_contactMessage
works just fine now.
I was wondering, how do I trigger the lang_acceptedBy
message? I haven't seen that being used, yet.
from telegram-support-bot.
The lang_acceptedBy
message is triggered by replying me
to a ticket. This was useful back then when there was no staff chat and staff members wrote directly to the bot. Kind of redundant now.
from telegram-support-bot.
Alright, cool!
from telegram-support-bot.
Related Issues (20)
- FreeBSD install guide HOT 2
- \ at the end of a sentence HOT 3
- Problem with specific symbol in confg - . ! etc HOT 6
- in list of open tickets make a short mark "replied" HOT 1
- Sending message from WEB isn't working HOT 2
- Button HOT 1
- "undefined" message after open new ticket HOT 2
- Add processing of edited messages by sender HOT 2
- Symbols not escaped (Markdown/MarkdownV2) HOT 3
- Docker-compose issue HOT 6
- I dont understand how to use it how to close ticket? HOT 1
- When I want to respond to someones ticket, the bot opens a new ticket for my response instead of telling them what I responded
- How to use web chat HOT 8
- Broadcast.
- install error HOT 2
- Doesnt Responde HOT 1
- Adding a link to a nickname
- issue with web chat HOT 2
- how to use it with centos? HOT 1
- install problem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegram-support-bot.