MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / configure

Method configure

js/botasaurus-server-js/src/server.ts:173–201  ·  view source on GitHub ↗
(
  {  
    headerTitle = '',
    rightHeader = {"text": "", "link": ""},
    readme = '',}:{
      headerTitle?: string;
      rightHeader?: { text?: string; link?: string };
      readme?: string;
    } 
  )

Source from the content-addressed store, hash-verified

171 }
172
173 configure(
174 {
175 headerTitle = '',
176 rightHeader = {"text": "", "link": ""},
177 readme = '',}:{
178 headerTitle?: string;
179 rightHeader?: { text?: string; link?: string };
180 readme?: string;
181 }
182 ): void {
183 if (!isObject(rightHeader)) {
184 throw new Error('rightHeader must be an object');
185 }
186
187 const validKeys = ['text', 'link'];
188 if (!Object.keys(rightHeader).every((key) => validKeys.includes(key))) {
189 throw new Error("rightHeader can only contain 'text' and 'link' keys");
190 }
191
192 if (!readme || readme.trim() === '') {
193 readme = getReadme();
194 }
195
196 this.config = {
197 "header_title":headerTitle,
198 "right_header":rightHeader,
199 "readme":readme,
200 };
201 }
202
203 addWhatsAppSupport(options: WhatsAppSupportOptions) {
204 if (options.number.length !== 10) {

Callers

nothing calls this directly

Calls 2

isObjectFunction · 0.90
getReadmeFunction · 0.85

Tested by

no test coverage detected